attrmap

package
v0.0.0-...-6513b37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoverAll

func CoverAll(txt text.Rich, start, end int) bool

CoverAll returns true if the given start and end covers the entire text segment.

Types

type AppendMap

type AppendMap struct {
	// contains filtered or unexported fields
}

func NewAppendedMap

func NewAppendedMap() AppendMap

func (*AppendMap) Anchor

func (a *AppendMap) Anchor(start, end int, href string)

func (*AppendMap) AnchorNU

func (a *AppendMap) AnchorNU(start, end int, href string)

AnchorNU makes a new <a> tag without underlines and colors.

func (*AppendMap) Close

func (a *AppendMap) Close(ind int, attr string)

func (*AppendMap) Finalize

func (a *AppendMap) Finalize(strlen int) []int

func (AppendMap) Get

func (a AppendMap) Get(ind int) (tags string)

func (*AppendMap) Open

func (a *AppendMap) Open(ind int, attr string)

func (*AppendMap) Openf

func (a *AppendMap) Openf(ind int, f string, argv ...interface{})

func (*AppendMap) Pad

func (a *AppendMap) Pad(start, end int)

Pad inserts 2 spaces into start and end. It ensures that not more than 1 space is inserted.

func (*AppendMap) Pair

func (a *AppendMap) Pair(start, end int, open, close string)

func (*AppendMap) Span

func (a *AppendMap) Span(start, end int, attrs ...string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL