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

Remove trailing whitespace in produced markdown #44

Merged
merged 1 commit into from Apr 20, 2013

Conversation

@stomar
Copy link
Contributor

@stomar stomar commented Mar 27, 2013

Avoids a trailing whitespace in link definitions without a title when converting to markdown (kramdown) format:

require 'kramdown'
htmldoc =<<HTML
<p><a href="http://test1.com/">Test 1</a></p>
<p><a href="http://test2.com/" title="Test 2">Test 2</a></p>
HTML
puts Kramdown::Document.new(htmldoc, :input => :html).to_kramdown

Output:

[Test 1][1]

[Test 2][2]



[1]: http://test1.com/X
[2]: http://test2.com/ "Test 2"

with a whitespace (marked by "X") at the end of link definition 1.

Avoids a trailing whitespace in link definitions without a title
when converting to kramdown format.
@stomar
Copy link
Contributor Author

@stomar stomar commented Apr 17, 2013

Ping? Any feedback?

@ghost ghost assigned gettalong Apr 18, 2013
@gettalong
Copy link
Owner

@gettalong gettalong commented Apr 18, 2013

Pong! Looks good, will have a detailed look on the weekend when I have more time.

@gettalong gettalong merged commit bbb28e4 into gettalong:master Apr 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants