denote
function denote( value, callback, markups): string;Defined in: core/src/features/tokens/parser/utils/denote.ts:20
Transform annotated text to another text by recursively processing all tokens
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
Annotated text to process |
callback |
(mark) => string |
Function to transform each MarkToken |
markups |
Markup[] |
Array of markup patterns to parse |
Returns
Section titled “Returns”string
Transformed text
Example
Section titled “Example”const text = '@[Hello](world) and #[nested @[content]]'const result = denote(text, mark => mark.value, ['@[__value__](__meta__)', '#[__slot__]'])// Returns: 'Hello and nested content'