Skip to content

Extra newlines appear in rendered README #965

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

Closed
sunjay opened this issue Aug 19, 2017 · 3 comments
Closed

Extra newlines appear in rendered README #965

sunjay opened this issue Aug 19, 2017 · 3 comments
Labels
A-frontend 🐹 A-readme C-bug 🐞 Category: unintended, undesired behavior E-help-wanted

Comments

@sunjay
Copy link
Member

sunjay commented Aug 19, 2017

I'm so excited that README files now show up in crates.io! I started using it without even realising and then when I saw that it was there I was so happy! 😄

I noticed that the css-color-parser has a lot of extra newlines for some reason when it is shown on crates.io vs. when it is shown on GitHub. There is a lot of extra space between bullets and after paragraphs which GitHub is able to collapse but crates.io does not.

Looking at the README, the author of that package seems to have added a <br> after every line for whatever reason. This is further exacerbated on crates.io in certain places because the inserted paragraph tags have additional space due to the <br>s added everywhere (see just after the word Reliable in the README). Crates.io should probably collapse all of that extra space together in the same way that GitHub does.

GitHub: https://github.com/7thSigil/css-color-parser-rs
Crates.io: https://crates.io/crates/css-color-parser

Screenshots: (click to view full size)

screencapture-crates-io-crates-css-color-parser-1503115712895

screencapture-github-7thsigil-css-color-parser-rs-1503115691837

@carols10cents carols10cents added A-ui C-bug 🐞 Category: unintended, undesired behavior E-help-wanted labels Aug 19, 2017
@anthonynguyen
Copy link
Contributor

anthonynguyen commented Aug 21, 2017

Seems like the Markdown renderer renders this just fine, but after it gets sanitized, all the <br>s get closed and that's what does the weird stuff.


original.md
Easy-to-use Rust parser for CSS3 color strings.<br>
Lightweight.<br>
Reliable (Provides tests, handles all errors to avoid panic!s).<br>

Not 100% spec compliant in the name of convenience (see examples below):<br>
  * allows for extra whitespaces<br>
  * allows for floats where standard allows percentages only<br>
rendered.html
<p>Easy-to-use Rust parser for CSS3 color strings.<br>
Lightweight.<br>
Reliable (Provides tests, handles all errors to avoid panic!s).<br></p>
<p>Not 100% spec compliant in the name of convenience (see examples below):<br></p>
<ul>
<li>allows for extra whitespaces<br></li>
<li>allows for floats where standard allows percentages only<br></li>
</ul>
cleaned.html
<p>Easy-to-use Rust parser for CSS3 color strings.<br>
Lightweight.<br>
Reliable (Provides tests, handles all errors to avoid panic!s).<br></br></br></br></p>
<p>Not 100% spec compliant in the name of convenience (see examples below):<br></br></p>
<ul>
<li>allows for extra whitespaces<br></br></li>
<li>allows for floats where standard allows percentages only<br></br></li>
</ul>

@Eijebong
Copy link
Contributor

Eijebong commented Aug 21, 2017

This is fixed in ammonia 0.6 :)

@carols10cents
Copy link
Member

Upgraded, deployed, and confirmed fixed!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 A-readme C-bug 🐞 Category: unintended, undesired behavior E-help-wanted
Projects
None yet
Development

No branches or pull requests

5 participants