Highlighter

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NormalText added in v0.1.10

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

NormalText is a highlighted text.

func NewNormalText added in v0.1.10

func NewNormalText(data []byte, style tcell.Style) *NormalText

NewNormalText creates a new highlighted data.

Parameters:

  • data: The data to create the highlighted data from.
  • style: The style to apply.

Returns:

  • *NormalText: The new highlighted data.

func (*NormalText) Runes added in v0.1.10

func (hd *NormalText) Runes() []rune

Runes returns the runes of the text.

Returns:

  • []rune: The runes of the text.

type Texter added in v0.1.10

type Texter interface {
}

Texter is a text.

type ValidText added in v0.1.10

type ValidText[T gr.TokenTyper] struct {
	// contains filtered or unexported fields
}

ValidText is a highlighted text.

func NewValidText added in v0.1.10

func NewValidText[T gr.TokenTyper](tokens []*gr.Token[T]) (*ValidText[T], error)

NewValidText creates a new highlighted data.

Parameters:

  • tokens: The tokens to create the highlighted data from.

Returns:

  • *ValidText: The new highlighted data.
  • error: An error of type *uc.ErrInvalidParameter if the tokens are empty.

Jump to

Keyboard shortcuts

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