-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Headers should be a serie of '#' followed by at least one whitespace #463
Comments
This looks like a duplicate of #265 |
Well #265 seems to be the exact opposite (and the issue closed), but yes, that's related. |
There's a long and ongoing discussion about the topic at CommonMark forums - looks like this is a rule that might change in future versions of CommonMark. |
@erusev I know that #265 happened which previously caused a fix for this issue to be reverted. Given that this occurred over three years ago, I wonder whether given the success of CommonMark in that time, it might be best to behave according to spec by default? Perhaps we could add a setter for those that really don't want to have a space there. |
I really need proper support for lines that begin with #hashtags, per the CommonMark and GFM specs. Please consider pull request #589. |
Closing as #589 was merged. The current plan is to add a strict mode in Currently this is the only case that strict mode controls, but this opens up the possibility of releasing very breaking (but compliant) changes in the future into strict mode (similar to this case) since the intent of the setter is to be compliant. I think it is wise to be as compliant as possible even when strict mode is off, but if there are changes where compliance generates major unforeseen breakage in existing texts (like #265) then it is nice to be able to limit that change to those that want strict compliance. |
Using Parsedown 1.6.
Currently, this
will render as:
As specified in CommonMark specification:
Also:
Expected result, same as Github:
#nottitle
Use case: I extended Parsedown to support
#hashtags
in my software, and hashtags set at the beginning of a new line now generate a header.EDIT: that's probably not the best way to do it, but I added this to my Parsedown extension to fix it:
The text was updated successfully, but these errors were encountered: