Metadata syntax (was Universal syntax for Markdown)

Sam Angove peasant at
Mon Sep 19 20:33:30 EDT 2011

On Mon, Sep 19, 2011 at 3:47 AM, John MacFarlane <jgm at> wrote:

> Another major problem, in my view, is that if a document starts

> with a phrase followed by a colon, it gets swallowed into metadata:

> [...]

> Also, because this is recognizable as metadata wherever it occurs

> in the document, one could then drop the requirement that the

> metadata occur at the top of the document, which I think is

> undesirable.

Another alternative is to re-use the syntax that Markdown already has
for document-level metadata:

[^f1]: A footnote here


[title]: Here is the title.
[abstract]: The abstract here.

As with footnotes, lists etc., indented lines continue the block.
[author]: John

Not quite as natural as the unbracketed version, but more consistent
with Markdown conventions and less likely to cause unpleasant
surprises. (The obvious risk is the potential for collision with
reference links, but I think it is quite minor, and could be minimized
by special-casing metadata at the beginning of a document.)

>From a syntax perspective, the idea would be that reference link

definitions, footnotes, MMD-format references etc. are all removed as
metadata. Keys starting with "^" are treated as footnotes, values
matching the URI/title form may be re-inserted as reference links,


More information about the Markdown-Discuss mailing list