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

with GFM enabled, double-space for newline does not work #152

mathematicalcoffee opened this issue Aug 6, 2014 · 1 comment


Copy link

In Markdown a double-space at the end of the line is supposed to create a break, like this:

require 'kramdown'"One  \nTwo").to_html
# => "<p>One<br />\nTwo</p>\n"

With GFM enabled and hard_wrap turned off, the same should happen, but it doesn't:"One  \nTwo").to_html
# => "<p>One  \nTwo</p>\n"

I expect the double-space followed by end of line to be converted to a newline in GFM (when hard_wrap is turned off), because this is what happens in standard markdown, and the hard_wrap option is meant to turn embedded newlines in paragraphs into <br/>, so with the option off it should revert to normal markdown behaviour.

(with hard_wrap turned on one gets "


\n" because the newline after the two spaces is turned into a br, but I expect this anyway).

@gettalong gettalong self-assigned this Sep 9, 2014
@gettalong gettalong added the bug label Sep 9, 2014
Copy link

Thanks for reporting this bug!

I have changed the implementation so that If hard_wrap is used, line breaks via two spaces/backslashes are not recognized. If hard_warp is not used, line breaks via two spaces/backslashes are recognized like in plain Markdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants