lexical
lexical copied to clipboard
Bug: backticks inside link title prevent Markdown rendering
- [relative/path/to/hello](relative/path/to/hello) : works
- [`relative/path/to/hello`](relative/path/to/hello) : does not render link
In GitHub both ways work:
- relative/path/to/hello
relative/path/to/hello
It appears a Markdown parsing issue where the backticks-inside-link variant simply does not get parsed as a link
Maybe the problem is in how https://github.com/facebook/lexical/blob/d13e5b893a2113d2df08c4d69e32cb8a355a8a23/packages/lexical-markdown/src/MarkdownTransformers.ts#L357-L390 is implemented as a text match. Within the caption, some markdown should be parsed too or at least it should still get parsed as a link (even if some formatting from the caption is discarded).
Maybe the backtick is not matched by this regexp? Some other formatting in the captions might be bold/italic text
Or maybe it is that INLINE_CODE gets imported before the links are parsed? Somehow INLINE_CODE in captions should not prevent links from getting parsed correctly
Duplicate of #5148