md2html.awk and a question

yy yiyu.jgl at
Fri Jul 17 03:43:27 EDT 2009

2009/7/17 Seumas Mac Uilleachan <seumas at>:

> Hi, if I read your example right, the bullet markup should take priority

> over anything else in that line. So the #h1 ##h2 ###h3 etc should not be

> headers since they are part of a bulleted list. Also the # is not the first

> character of the line.


Dingus does not consider it a header if it is at the begining of the
list, but it does it if it is not the first paragraph. However, for
some reason, it considers the line "* ###wtf is this?" a header.

> As for the indented #an h1, should that be a header? I would think not

> myself. If it's indented it's intended to be something else to my thinking.


I like to think that quote blocks and list items can contain
everything as long as it is preceeded by the right indentation.

> As for the


> - btw, this an h1, not a list item

> ===================


> that is so ambiguous it could be either. I suppose the ==== and ----

> headers, since they span multiple lines, probably take priority over

> everything.

In Dingus, the indentation of the equal signs line makes a difference.
I think this is the right behaviour, but I don't see how it could be
applied to setex-style headers.

> Then again, it may depend on your markdown version (perl, php, python,

> haskell, etc).


I know it depends on the version. I am writing my own implementation
in awk and would like to be as compatible as possible with existing
documents. I think what I will do is to not look for headers at the
beginning of list items, since some files I have found contain lists
with irc channels (so, starting with #) that were becoming unwanted
h1's. It would not be a problem at all to check for different
conditions, but they are not evident to me and I'm not sure it is
worth the trouble.

Thanks for your reply,

- yiyus || JGL .

More information about the Markdown-Discuss mailing list