Documentation ¶
Index ¶
- func ClaspDirectives(doubledRunes []rune, entities []*client.TextEntity) []*client.TextEntity
- func Format(sourceText string, entities []*client.TextEntity, markupMode MarkupModeType) string
- func MergeAdjacentEntities(entities []*client.TextEntity) []*client.TextEntity
- func SortEntities(entities []*client.TextEntity) []*client.TextEntity
- type MarkupModeType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaspDirectives ¶ added in v1.2.0
func ClaspDirectives(doubledRunes []rune, entities []*client.TextEntity) []*client.TextEntity
ClaspDirectives to the following span as required by XEP-0393
func Format ¶
func Format( sourceText string, entities []*client.TextEntity, markupMode MarkupModeType, ) string
Format traverses an already sorted list of entities and wraps the text in a markup
func MergeAdjacentEntities ¶ added in v1.2.0
func MergeAdjacentEntities(entities []*client.TextEntity) []*client.TextEntity
MergeAdjacentEntities merges entities of a same kind
func SortEntities ¶
func SortEntities(entities []*client.TextEntity) []*client.TextEntity
SortEntities arranges the entities in traversal-ready order
Types ¶
type MarkupModeType ¶ added in v1.9.0
type MarkupModeType int
const ( MarkupModeXEP0393 MarkupModeType = iota MarkupModeMarkdown )
Click to show internal directories.
Click to hide internal directories.