Formal Grammar — some thoughts
pagaltzis at gmx.de
Mon Jul 31 18:25:35 EDT 2006
* Michel Fortin <michel.fortin at michelf.com> [2006-07-31 21:05]:
> Le 30 juil. 2006 à 21:29, Allan Odgaard a écrit :
> >Now try the same on these two lines of text:
> > This `is raw [text`](#)
> > This is a [`link](#) and more text`
> >If you choose to replace links with an md5 first, then the
> >result of converting the first line will be wrong, whereas if
> >you choose to convert raw first, the second line will be
> What's wrong and right here? It could be argued that since it's
> not defined in the syntax description whichever comes first
> should be the rule and no priority should be given to one
> syntax construct over another,
No, it’s pretty clear. A backtick starts a sequence in which each
character is interpreted literally. I don’t see how there can be
any question: within code spans, there is no markup.
> but the fact is that it's still undefined and that John's
> reference implementation prioritize code spans over links.
It does the right thing according to the syntax definition.
As it so happens, this case is easy to model with a proper
Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Markdown-Discuss