Optional features (was: Markdown Extra Specification (First Draft))
pagaltzis at gmx.de
Sat May 24 18:20:22 EDT 2008
* Yuri Takhteyev <qaramazov at gmail.com> [2008-05-24 21:35]:
> * Aristotle Pagaltzis <pagaltzis at gmx.de> [2008-05-24 11:15]:
> > If your XHTML parser has a streaming input mode, you can
> > couple your Markdown converter directly to the XHTML parser
> > and feed the HTML output to it as you go. If the XHTML parser
> > throws a well-formedness error, you can then relate it to
> > the vicinity of the last Markdown chunk you converted to HTML
> > and passed into the XHTML parser.
> I am not quite sure what you mean, but Markdown documents can't
> always be processed on a chunk by chunk basis. Consider:
> Here is a [link][id].
> ... 100KB of text...
> [id]: http://example.com/ "Optional Title Here"
> This document cannot be processed correctly unless it's
> considered all at the same time.
Good point, so streaming the Markdown input is not possible. But
that doesn’t mean you can’t generate the output piecemeal and
also feed it to the XHTML parser that way.
Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Markdown-Discuss