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

Angle-bracketed URL right after a linebreak is rendered without the linebreak #461

Closed
brlin-tw opened this issue Oct 15, 2017 · 5 comments
Closed
Assignees
Labels

Comments

@brlin-tw
Copy link

@brlin-tw brlin-tw commented Oct 15, 2017

Input

First line  
<https://example.com/second-line-url>  
Third line <https://example.com/with-an-url>

Note: 2 trailing space characters after First line and /second-line-url>

Current Output

<p>First line
<a href="https://example.com/second-line-url">https://example.com/second-line-url</a><br />
Third line <a href="https://example.com/with-an-url">https://example.com/with-an-url</a></p>

Expected Output

<p>First line<br />
<a href="https://example.com/second-line-url">https://example.com/second-line-url</a><br />
Third line <a href="https://example.com/with-an-url">https://example.com/with-an-url</a></p>

Commandline (in GNU Bash)

kramdown\
	--input kramdown\
	--output html\
	<kramdown-issue-461-reproduction-sample.markdown\
	>kramdown-issue-461-reproduction-sample.html

Additional Info

Here's the output when --input is set to GFM

<p>First line<br />
<a href="https://example.com/second-line-url">https://example.com/second-line-url</a>  <br />
Third line <a href="https://example.com/with-an-url">https://example.com/with-an-url</a></p>

Notice the re-appeared expected line break at line 1 and redundant 2 spaces before the line break of line 2

Kramdown

1.15.0 from RubyGems

Ruby

2.3.1p112 (2016-04-26) from Ubuntu 16.04 archive

@brlin-tw
Copy link
Author

@brlin-tw brlin-tw commented Oct 15, 2017

Loading

@gettalong gettalong self-assigned this Oct 15, 2017
@gettalong
Copy link
Owner

@gettalong gettalong commented Oct 15, 2017

Please edit your issue text so that it is clear what the difference is, showing the input, the current HTML output and the, in your opinion, correct HTML output. Images are not really useful.

Loading

@brlin-tw
Copy link
Author

@brlin-tw brlin-tw commented Oct 15, 2017

@gettalong Updated. Thanks for pointing out.

Loading

@brlin-tw brlin-tw changed the title [GitHub Pages] URL after a newline is rendered without newline URL right after a linebreak is rendered without the linebreak Oct 15, 2017
@brlin-tw brlin-tw changed the title URL right after a linebreak is rendered without the linebreak Angle-bracketed URL right after a linebreak is rendered without the linebreak Oct 15, 2017
@gettalong gettalong added the bug label Oct 16, 2017
@gettalong
Copy link
Owner

@gettalong gettalong commented Oct 16, 2017

Thanks for updating the issue - now I know what you mean 👍 And it seems to be a bug.

Loading

@gettalong
Copy link
Owner

@gettalong gettalong commented Oct 26, 2017

I have identified the problem - the fix will be in the next release!

Loading

@gettalong gettalong closed this Oct 26, 2017
gettalong added a commit that referenced this issue Nov 5, 2017
A line break on the last line of a paragraph is ignored. However, due to
the way paragraphs are parsed (a single paragraph may sometimes be
parsed as multiple paragraphs that are then joined), care has to be
taken to restore the two spaces where needed.

Fixes #461
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