Unexpected output when input is a single line with a colon

0 views
Skip to first unread message

Jerry Krinock

unread,
Sep 9, 2009, 3:52:42 PM9/9/09
to MultiMarkdown Discussion List
If I process a file consisting of a single line of text containing a
colon such as this:

Hello: *World*

through MultiMarkdown.pl, I get an unexpected result:

Hello: *World*<br />



(Note: There are two newlines at the end there)

If I prepend a newline to Hello: *World*, then I get the expected
result:

<p>Hello: <em>World</em></p>

If I process this same line through Gruber's Markdown.pl, then I get
the expected result, with or without the newline prepended.

Would we call this a bug?

Jerry

Fletcher Penney

unread,
Sep 9, 2009, 6:27:43 PM9/9/09
to MultiMarkdown Discussion List
This is because "Hello: World" is being treated as metadata, since it
has a colon and is at the top of the file (the definition of
metadata).

Inserting the leading blank line is the recommended method of
preventing MMD from interpreting this as metadata.

F-
Reply all
Reply to author
Forward
0 new messages