possible bug in PHP Markdown implementation of footnotes,
as well as request for standardized XHTML output
Michel Fortin
michel.fortin at michelf.com
Wed Sep 20 22:40:56 EDT 2006
Le 20 sept. 2006 à 17:58, Fletcher T. Penney a écrit :
> I am glad to see support for footnotes working its way into other
> implementations of Markdown!
And I'm glad to see there is interest in footnotes. :-)
> Issue # 1. There appears to be a bug in the footnote parser that
> causes material following the footnote to be included as part of
> the footnote. For example:
Adam McMaster already signaled this bug at the start of this thread
and has found a clever workaround until I fix it which is to put a
comment just after the footnote, before the new content.
> Issue # 2. I would like to work towards a single consensus output
> format for the footnote syntax as well --- MultiMarkdown and PHP
> Markdown should have the same output format for compatibility reasons.
I agree. But I think the scope for that problem goes a lot further
than Markdown and its implementations. Maybe it'd be a good idea to
make a microformat for footnotes, and try to standardise it through
microformats.org.
I'm not convinced there is a real need to have the exact same
resulting markup however. As long as the output is in a format you
can parse easily to extract footnote content and find reference
markers in the text, it'd be fine by me.
That doesn't mean we should make things different just for the sake
of it either. But I have no problem with different implementations,
with different goals, doing different things. There is value in variety.
> 1. MultiMarkdown used div's, PHP Markdown uses an ordered list. It
> doesn't much matter, as long as there is a way for an XSLT parser
> to reliable identify what constitutes each footnote. I suppose one
> potential problem with the ordered list would be the inability to
> set an arbitrary number for the first footnote, but in actuality
> neither system could take advantage of it at the moment. It's
> worth considering, but I am not sure there is an overwhelming
> reason to choose one over the other. Any thoughts from others?
About arbitrary footnote numbers, I don't think many people need
that. Those that do will probably want something integrated with a
pagination system, which is way beyond what we should care at the
moment. But I think it proves my previous point: no single markup is
going to satisfy everyone's needs.
> 2. Reverse links should be from the footnote number, or from the
> ↩ symbol, in both syntaxes. Again, I don't see an
> overwhelming reason to choose one over the other. I can easily
> modify MultiMarkdown to use the ↩ symbol if that is the
> consensus opinion.
As you said, they're both fine output. I'm following what John's
doing because that's what I've always done with PHP Markdown.
But I don't see a necessity for all implementations to have the same
output. As long as the markup allows the identification of footnotes
and of their reference markers -- so that it can be changed to
another format for instance -- it's fine by me.
> 3. Same thing goes for the syntax to choose footnote related id
> tags. They can be whatever, but should be consistent.
It could be a good idea if there was some sort of convention between
Markdown implementations about how to generate the id. The reason
being that if someone switches implementation, it would be preferable
that it does not break any external bookmark to a footnote.
That said, it probably wouldn't be a good idea to rely on the id
attribute staying the same too much either. There are good reasons to
change the generated id, adding an entry-specific prefix for a blog
which may display more than one entry per page for instance.
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the Markdown-Discuss
mailing list