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
markdown_github line break behavior #3594
Comments
maybe it would be reasonable, but it is not so. e.g.:
renders here on GitHub as: abc Please also consider asking questions like this on pandoc-discuss, the issue tracker is for bugs. |
Sorry, I didn't follow that. When you say "it's not so" what are you basing that on? The behaviour of pandoc? On Github itself,
is rendered just as I said it should be:
That indicates that this is a bug on pandoc. Have I missed something?! |
@rmwiseman are you sure? I just tried in my comment above and it was split into two lines... is the behaviour different in READMEs? |
Ah, this probably has to do with https://githubengineering.com/a-formal-spec-for-github-markdown/ @jgm Maybe there should be a new extension flag? e.g. |
Related stackoverflow question: http://stackoverflow.com/questions/24575680/new-lines-inside-paragraph-in-readme-md The non-linebreaking behavior can be forced by using |
You're both right. GitHub has two Markdown modes, one for long-form documents like READMEs and one for short things like issue coments. In issue comments, a line break is treated as a hard line break. In README, wikis, etc., it is treated as a space as in regular Markdown. People often get confused by this. [And it has nothing to do with CommonMark; now that GitHub is using CommonMark, they're still locally adding the hard line breaks extension in issue comments.] We had to choose one for the default in |
All that this Github help page says about paragraphs and line breaks is:
Because this doesn't override the standard markdown behaviour for paragraphs and line breaks, it's reasonable to assume it will behave in the same way as standard markdown.
However:
results in:
but should, like with
markdown_strict
, result in:The text was updated successfully, but these errors were encountered: