Inconsistent precedence in Markdown parser #42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There seems to be a conflict between my custom inline parser and image tags.
This is my code:
This issue is that my copy tag gets mistaken for on image when placing a
!character before the closing tag.Since it is parsed after Italic it should be parsed before images. If I set it to be before image it gets interpreted as a link.
I don't see what else can be done on my end to fix this.
Here are some screenshots of the behaviour:


The order in which inline parsers get applied applies to the first character they match. So at the
!, all inline parsers would be tried, in order, and since your custom syntax doesn't match there yet, even if it has a higher precedence than images, it won't match yet, but then the image parser will match, and consume the bracket syntax. As such, you may not be able to parse this notation in combination with images using @lezer/markdown, at the moment.