denote
function denote( value, callback, markups): string;Defined in: packages/core/src/features/parsing/ParserV2/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__)', '#[__nested__]'])// Returns: 'Hello and nested content'