Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement request — optional space after # for headers #117

Closed
trevor opened this issue Mar 31, 2014 · 7 comments
Closed

enhancement request — optional space after # for headers #117

trevor opened this issue Mar 31, 2014 · 7 comments
Assignees
Labels

Comments

@trevor
Copy link
Contributor

@trevor trevor commented Mar 31, 2014

Would it be possible to support preventing header creation without a space after #? This may make sense as a default in GFM mode?

Similar to :space_after_headers in https://github.com/vmg/redcarpet


# a header

text1

#not a header

text2

a header

text1

not a header

text2

@gettalong
Copy link
Owner

@gettalong gettalong commented Mar 31, 2014

It couldn't be the default because it would change semantics and possibly break documents. However, a pull request for such a new option would be appreciated

@trevor
Copy link
Contributor Author

@trevor trevor commented Mar 31, 2014

Just to clarify — couldn't be the default for the Kramdown parser or the Kramdown GFM? (that is http://kramdown.gettalong.org/parser/gfm.html )

It seems like it should be the default for Kramdown GFM since that is how GFM is rendering above?

@gettalong
Copy link
Owner

@gettalong gettalong commented Mar 31, 2014

It can't be the default for kramdown because it would possibly break documents. However, it this is considered a bug in kramdown's GFM implementation, it could certainly be fixed - but should we then add a new option? What do you think?

@trevor
Copy link
Contributor Author

@trevor trevor commented Mar 31, 2014

I don't know all the factors to weigh the decision. I'd add it as a general option for Kramdown, and make it the default in GFM.

@gettalong
Copy link
Owner

@gettalong gettalong commented Jun 2, 2014

I don't like to add options for the kramdown parser that change the behavior of the parser but I can add this option for the GFM parser (with the default being turned off since otherwise it would break backwards compatibility except if this is considered a bug).

@trevor
Copy link
Contributor Author

@trevor trevor commented Jun 2, 2014

Sounds good to me, modification to the GFM parser sounds appropriate.

I'd guess it's a bug since it's not how GitHub is currently treating headers, from the example above they require the space character.

@gettalong gettalong added the bug label Jun 4, 2014
@gettalong gettalong self-assigned this Jun 4, 2014
@gettalong
Copy link
Owner

@gettalong gettalong commented Jun 4, 2014

Fixed as bug with 81d5420

@gettalong gettalong closed this Jun 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants