Markdown Extra Spec: Parsing Section

John MacFarlane jgm at berkeley.edu
Fri May 9 13:39:42 EDT 2008


Michel,

I think there's a problem with:


> refname

>

> A run of one or more characters, excluding any newline and U+005D

> Closing Square Bracket.


This doesn't allow refnames with embedded brackets. But PHP Markdown
allows

[[hi]](/url)

as a valid link. Also, PHP Markdown currently allows embedded newlines,
which are excluded by your definition:

[hi
there](/url)

Of course, embedded *blank* lines should be excluded.

John

+++ Michel Fortin [May 08 08 23:59 ]:

> Hello all,

>

> I've began writing the parsing section of the spec, and I though I'd let

> you know about where I'm heading with all this.

>

> Basically, parsing is defined as three consecutive passes: parsing

> document elements, parsing block elements and parsing span elements.

> Each pass is going to contain a set of rules the parser should attempt

> to match while parsing the input. Rules are expressed in English, but

> are highly structured so that it should be pretty straightforward to

> convert to a formal grammar if the grammar is powerful enough to express

> them.

>

> I'm not saying too much here; elaborate explanations are better in the

> spec than in this volatile email. If you're interested, take a look and

> tell me what you think:

> <http://michelf.com/specs/markdown-extra/#parsing>

>

>

> Michel Fortin

> michel.fortin at michelf.com

> http://michelf.com/

>

>

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

>



More information about the Markdown-Discuss mailing list