Giter Site home page Giter Site logo

Comments (6)

Alir3z4 avatar Alir3z4 commented on May 23, 2024

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.

theSage21 avatar theSage21 commented on May 23, 2024

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.

Alir3z4 avatar Alir3z4 commented on May 23, 2024

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.

theSage21 avatar theSage21 commented on May 23, 2024

@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.

Alir3z4 avatar Alir3z4 commented on May 23, 2024

Yes <br> is 2 spaces in markdown.
That's correct, what I was thinking.

The issue is closed and marked as invalid.

from html2text.

sirdodger avatar sirdodger commented on May 23, 2024

Thanks for the clarification!

from html2text.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.