Comments (6)
I'm not really sure the design decision behind having that extra space.
@theSage21 any idea?
@sirdodger If no specific reason is behind this, a flag is welcome to switch this thing off explicitly
from html2text.
After some digging I found that this particular line of code was written at aaronsw@7a327b8. Since he has passed away, and this was an initial commit, I cannot comment on the purpose of this code.
We can safely do away with this though it is notewhile to remember that some tests fail on changing this behaviour. In my opinion we should correct this completely without leaving a flag or so which will only bloat the codebase.
To support the last decision, since this has gone unreported for so long chances of people being affected by it are relatively low. When we change this, the worst that happens is that their tests fail, and changelog can mention that this is to be expected.
@Alir3z4 @sirdodger sound ok?
from html2text.
From my point of view I can't figure out the reason for this behavior.
If others also can't find a reasonable design decision behind this then my vote would go for having a flag to switch it off and remove the extra spaces from the output, which means no one's tests will fail since the default will be having the two extra spaces and the flag would be to switch this behavior.
from html2text.
@Alir3z4 @sirdodger If I remember correctly, two spaces at the end of a line specify a new line in Markdown. This is in github too I think.
This is line 1.
This is line 2.
There are two spaces at the end of this line.
This is line 4.
This is line 1.
This is line 2.
There are two spaces at the end of this line.
This is line 4.
Maybe we should let this be? It is a feature of Markdown after all.
--edit--
Ok. This is a feature. I vote that this remains untouched.
from html2text.
Yes <br>
is 2 spaces in markdown.
That's correct, what I was thinking.
The issue is closed and marked as invalid.
from html2text.
Thanks for the clarification!
from html2text.
Related Issues (20)
- colspan is entirely ignored, which results in misformated tables
- Semicolon in Text with &#. HOT 1
- IndexError when padding nested tables HOT 2
- inline tags within strong/strike/u/i/em/... do not handle spaces correctly
- Different results when `HTML2Text` object is reused HOT 2
- Strip leading/trailing whitespace for links and inline code HOT 1
- Cannot provide space between content of <option> tag in <select>
- The export format is incorrect when the table tag contains < p > or < br >
- Featurerequest: Output without markdown HOT 3
- RE_MD_DASH_MATCHER does not exist in the HTML2TEXT() object
- Character reference replacement results in raw HTML
- Broken Images in README.md HOT 2
- How can I parse the `<pre>` tag into tri-backquote style?
- [Bug] Assumes first row is always table header even if it is not
- --ignore-links flag creates new composite words in output
- Link titles break with encoded quote
- Ignoring some elements
- HTML <picture> Element not returned as image link from srcset
- charref() maybe throw OverflowError: Python int too large to convert to C int HOT 1
- Extra "\" slashes before specific numeric
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html2text.