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

Double space at the end won't translate to <br /> #212

Closed
lobo-tuerto opened this issue Dec 2, 2018 · 6 comments
Closed

Double space at the end won't translate to <br /> #212

lobo-tuerto opened this issue Dec 2, 2018 · 6 comments
Assignees
Labels

Comments

@lobo-tuerto
Copy link

In the README it's mentioned that Earmark supports Standard Gruber markdown.

And it's mentioned there that:

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

So, I'm trying this:
(Notice the two spaces at the end of the first line)

This is some **strong** text.  
This is some _emphasized_ text.

So, doing this:

markdown = "This is some **strong** text.  \nThis is some _emphasized_ text."
html = Earmark.as_html!(markdown)
IO.inspect(html)
# => "<p>This is some <strong>strong</strong> text.  \nThis is some <em>emphasized</em> text.</p>\n"

Am I missing some option so it translates two ---or more--- consecutive spaces to a <br />?
(Not looking to translate every line-break into a <br />)

@RobertDober
Copy link
Collaborator

No you are not missing anything, this is indeed a bug, thank you for reporting it.

@RobertDober RobertDober self-assigned this Dec 2, 2018
@RobertDober RobertDober added the bug label Dec 2, 2018
@RobertDober RobertDober added this to the 1.3.1 milestone Dec 2, 2018
@lobo-tuerto
Copy link
Author

@RobertDober Sorry to ask about this, but when are you going to push a new release that incorporates this fix?

@RobertDober
Copy link
Collaborator

I was planning to add #158 and maybe #171 to 1.3.1 before releasing. Now I can definitely push #171 to 1.3.2 if it shall take long. I'd say ETA of the release, maybe mid January.

But if this is urgent for you I guess I can release 1.3.1 in its current state. Ok for you @pragdave ?

@pragdave
Copy link
Owner

pragdave commented Dec 21, 2018 via email

@lobo-tuerto
Copy link
Author

Thanks @RobertDober!

@RobertDober
Copy link
Collaborator

published

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

No branches or pull requests

3 participants