manmal / hn-android

Hacker News client with a focus on reliability and usability.
https://play.google.com/store/apps/details?id=com.manuelmaly.hn
489 stars 160 forks source link

Remove trailing space in multi-paragraph comments #162

Closed tbroadley closed 9 years ago

tbroadley commented 9 years ago

This change fixes an issue where multi-paragraph comments have some extra space after the comment. This happens because the last paragraph is wrapped in a <p> element. You can see this happening in mcv's comment below.

hn-before

This pull request changes the HNCommentsParser class so that closing </p> tags in the comment HTML are replaced with <br/><br/>, and opening <p> tags are removed. This way, there is a double space between each of the paragraphs, and no spacing after.

hn-after

peshkira commented 9 years ago

Thanks for this PR, @tbroadley. I will try to release the new version over the weekend.

tbroadley commented 9 years ago

Awesome, thank you.

drewnoakes commented 9 years ago

Thanks for this @tbroadley.

@peshkira has there been a release? The version on my phone still has this blank space all over the place.

peshkira commented 9 years ago

No, I am sorry. I just didn't find the time in the last months to test and take a look. The next release is coming in the following days as there have been a few other PRs from generous devs :).