FYI: another extra for managing headers #70

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant
@mbreese

mbreese commented Sep 26, 2011

In a project I'm working on, I wanted to be able to capture twitter-style hash tags, but still have markdown format. However, if the #tag was the first thing on a line, it would match the header regex, which wasn't what I wanted. So, now when the extra 'tag-friendly-headers' is passed, whitespace is now required between the opening # and the rest of the header. Otherwise, the #tag is left as-is.

Example 1:

tag

standard code:

tag


w/ my extra: #tag

Example 2:

header

standard code:

header


w/ my extra:

header

Interestingly, this change doesn't break any of the tests... nor is it explicitly dealt with in Gruber's syntax sheets (that I know of).

Feel free to accept or reject the pull as you'd like.

Commit text

Requires white-space between "#" and the header in order to qualify as a "<h?>"

This lets us include hash-tags (#tagname) as the first item on a line and have it not converted to a <h?>

Added extra "tag-friendly-headers"
Requires white-space between "#" and the header in order to qualify as a "<h?>"

This lets us include hash-tags (#tagname) as the first item on a line and have it *not* converted to a <h?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment