Closed sferik closed 11 years ago
Here's another example that uses H2s: https://raw.github.com/intridea/hashie/master/CHANGELOG.md
H1 is reserved for the title of the document. I believe this use case is pretty common and should be supported.
Goot catch! but I though HTML5 allows multiple H1? Will dig into this and the markup rules to ensure we respect hierarchy
We could, but if we allow all levels of header + optional date, the regexp will match too many things, because only thing left will be /#+ ([0-9.A-Za-z-]+) \/ \d{4}-\d{2}-\d{2}/ In the provided changelog, there's no h1, so it's a semantic issue, more than parsing.
What about supporting just H1 & H2? /^#{1,2}
... or if not that, just switching outright to H2?
As @sferik says, H1 is generally the heading for the document, eg. # Changes
or h1. Changes
.
Regarding HTML5, there is a <header>
tag that would allow multiple H1s in a single page. But since we're using Markdown, Textile, etc, I don't think that really changes anything regarding this request.
Very glad to see this (H2 support)!
Here's an example of a
CHANGELOG
that uses an H2 instead of an H1 in the header: https://raw.github.com/wycats/thor/master/CHANGELOG.mdI can't think of any reason why this should not be supported. The spec should just require that there be a header row (any level, 1 through 6).