Documentation
¶
Index ¶
- func EntityToMarkdown(entity *client.TextEntity) (*Insertion, *Insertion)
- func EntityToXEP0393(entity *client.TextEntity) (*Insertion, *Insertion)
- func Format(sourceText string, entities []*client.TextEntity, ...) string
- func SortEntities(entities []*client.TextEntity) []*client.TextEntity
- type Insertion
- type InsertionStack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EntityToMarkdown ¶
func EntityToMarkdown(entity *client.TextEntity) (*Insertion, *Insertion)
EntityToMarkdown generates the wrapping Markdown tags
func EntityToXEP0393 ¶
func EntityToXEP0393(entity *client.TextEntity) (*Insertion, *Insertion)
EntityToXEP0393 generates the wrapping XEP-0393 tags
func Format ¶
func Format( sourceText string, entities []*client.TextEntity, entityToMarkup func(*client.TextEntity) (*Insertion, *Insertion), ) string
Format traverses an already sorted list of entities and wraps the text in a markup
func SortEntities ¶
func SortEntities(entities []*client.TextEntity) []*client.TextEntity
SortEntities arranges the entities in traversal-ready order
Types ¶
type InsertionStack ¶
type InsertionStack []*Insertion
InsertionStack contains the sequence of insertions from the start or from the end
func (InsertionStack) NewIterator ¶
func (s InsertionStack) NewIterator() func() *Insertion
NewIterator is a second order function that sequentially scans and returns stack elements; starts returning nil when elements are ended
Click to show internal directories.
Click to hide internal directories.