Backtick Hickup

Allan Odgaard 29mtuz102 at sneakemail.com
Mon Aug 13 21:27:37 EDT 2007


On Aug 13, 2007, at 10:20 AM, Michel Fortin wrote:


> Le 2007-08-12 à 23:23, Allan Odgaard a écrit :

>

>> I would have expected it to see first two back-ticks, then scan

>> forward until another two back-ticks are seen (since the open-

>> token defines the close-token) and thus give this output:

>>

>> <p>Backtick: <code>\</code>`</p>

>> [...]

> [snip]


Regardless of how much look-ahead most parsers currently use, do you
disagree with my interpretation?

If so, can provide a more formal definition of how you believe the
spec should be read?

Basically I read it as code-spans can be matched using this regexp: (`
+) ?.*? ?\1

Although in practice we may 1) require at least one character inside
the code-span (so `` on its own is not a zero-character code span)
and 2) we may want to limit them to “markdown paragraphs” which are
roughly defined as ending when there are two consecutive newlines,
making the pattern: (`+) ?(.|\n(?!\n))+? ?\1




More information about the Markdown-Discuss mailing list