content

package
v0.0.0-...-2e97daa Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TokenTypeText      = TokenType{"text"}
	TokenTypeLink      = TokenType{"link"}
	TokenTypeNostrLink = TokenType{"nostrLink"}
)
View Source
var (
	ElementTypeText = ElementType{"text"}
	ElementTypeLink = ElementType{"link"}
)

Functions

This section is empty.

Types

type Element

type Element struct {
	Type ElementType
	Text string
}

type ElementType

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

type Lexer

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

func NewLexer

func NewLexer(s string) *Lexer

func (*Lexer) Lex

func (l *Lexer) Lex() ([]Token, error)

type Token

type Token struct {
	Type TokenType
	Text string
}

type TokenType

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

type Transformer

type Transformer struct {
}

func NewTransformer

func NewTransformer() *Transformer

func (*Transformer) BreakdownAndTransform

func (t *Transformer) BreakdownAndTransform(content string) ([]Element, error)

Jump to

Keyboard shortcuts

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