removeLineBreaks causes inconsistency in text content spaces
See original GitHub issueWith the option removeLineBreaks: true
in https://github.com/ndaidong/article-parser/blob/e0543954b4b00b5f7937a888754ebb395ed39d4a/src/utils/standalizeArticle.js#L39 the text spaces in many articles are replace with a line break \n
. The words end up coming together (when not using a browser to display the result)
Here some screenshots examples with yarn eval ./test-data/regular-article.html
1. removeLineBreaks: true
2. removeLineBreaks: false
I think we can do improve the sanitizer
Issue Analytics
- State:
- Created a year ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
"Display: none" seems to remove line breaks in text elements ...
The problem: if I have content in a text element that is currently not being displayed and I save it to localstorage, when...
Read more >Remove line breaks followed by space in text file
Is there a way to remove only those line endings followed by a space? I have quite a number of small files which...
Read more >Remove extra whitespace caused by line break within a button
The word-break CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box.
Read more >Line breaks are removed in posts made in plain text format
This causes the line breaks to be removed. Any two or more successive line breaks are not removed. Workaround. Use one of the...
Read more >Why do emails created from Templates and Signatures ... - FYI
Issue The formatting of emails created from templates or signatures within FYI results in unnecessary line breaks or inconsistent fonts...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, I can do that.
The output won’t display to user. So it’s fine in my mind.