Giter Site home page Giter Site logo

Comments (7)

erusev avatar erusev commented on May 7, 2024

What is you understanding based on? The spec says nothing about the matter and the original parser would parse the text the same way Parsedown would - ****test**** to <p><strong><em>*test</em>*</strong></p>. The same goes for the parser at StackOverflow.

from parsedown.

gitdexby avatar gitdexby commented on May 7, 2024

Sorry for the delay. The 4-asterisk issue could possibly be dealt with, but the 5 asterisk issue results in invalid HTML - it's actually html in the first example with 4 asterisks, but I mistakenly put it there instead of on the 5 asterisks. If you take the HTML generated from the 5 asterisk example and put it into a simple document to be validated at w3c.org, you'll see the failures. At the very least, the parsing should result in valid HTML.

<p><strong><em></strong>test<strong></em></strong></p>

I came across this issue when I was working on an HTML parser in order to convert some formatting over to PDFs via parsing the stream of HTML. When the nesting and tag matching is invalid as described with the 5 asterisks, then parsing the stream becomes unreliable and fails.

I'd like to use Parsedown because it is so much faster, but without valid HTML as the result, it becomes unpredictable so I had to switch over to michelf's library which just results in:

*_test_*

from parsedown.

erusev avatar erusev commented on May 7, 2024

I'll see what I can do.

from parsedown.

erusev avatar erusev commented on May 7, 2024

Should be resolved in the latest release latest release.

from parsedown.

hkdobrev avatar hkdobrev commented on May 7, 2024

The related commit has introduced a regression and the Travis CI build failed: https://travis-ci.org/erusev/parsedown/builds/14410969

from parsedown.

hkdobrev avatar hkdobrev commented on May 7, 2024

The related commit has introduced a regression

OK, it is not a regression, but just the new tests for this fix are not passing.

from parsedown.

erusev avatar erusev commented on May 7, 2024

There was a test that wasn't passing. The latest release resolves this.

from parsedown.

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.