That will work but link has sub tokens in token.tokens
that the parser uses to render the text.
So it will have to be something like
\n try {\n\t\t// ![](https://invalid-image.com)\n\t\tconst image = await fetch(token.href)\n\t} except {\n\t\ttoken.text = 'link'\n\t\ttoken.type = 'link'\n token.tokens = lexer.inlineTokens(token.text); // This will tell the parser what to output\n\t}\n
-
During try {
// ![](https://invalid-image.com)
const image = await fetch(token.href)
} except {
token.text = 'link'
token.type = 'link' // Something like this, however it doesn't seen to work when I do this
// [link](https://invalid-image.com)
} |
Beta Was this translation helpful? Give feedback.
-
That will work but link has sub tokens in So it will have to be something like
|
Beta Was this translation helpful? Give feedback.
That will work but link has sub tokens in
token.tokens
that the parser uses to render the text.So it will have to be something like