Giter Club home page Giter Club logo

Comments (7)

nikku avatar nikku commented on July 19, 2024 3

Note that there is a lot of specifics in CommonMark that you may not want to implement in a single regex:

AS~~asdsa~~.   
AS_ASD_  
AS__ASD_  
AS*ASD**  
AS*ASD*     (x)  
AS*ASD  
**A*  

Rendered:

image

A tiny library may ship with certain limitations.

from snarkdown.

developit avatar developit commented on July 19, 2024

Ah for sure. The parser can probably be tweaked to fix this.

from snarkdown.

jacobmischka avatar jacobmischka commented on July 19, 2024

Actually hm, according to the original markdown post on daringfireball I think snarkdown's behavior here is correct. This might be a spec difference between commonmark and "traditional" markdown, I haven't yet read the commonmark spec on the subject to be sure.

If that is the case, I suppose it's up to you which one you want to support.

Regardless, thanks again! And no urgency on this or anything, of course.

from snarkdown.

developit avatar developit commented on July 19, 2024

I see the value of skipping foo_bar for sure.

from snarkdown.

antony avatar antony commented on July 19, 2024

It seems that single underscores in links are parsed too, which makes posting links difficult:

https://www.beyonk.com/uk/tohp-_/ben-nevis-guiding

becomes

https://www.beyonk.com/uk/tohp-/ben-nevis-guiding

I think this is an actual issue, since the phrase is not wrapped per-se, it's a single occurrence.

from snarkdown.

ribeaud avatar ribeaud commented on July 19, 2024

Could reproduce this problem as well. Any plan to fix it soon?

from snarkdown.

yanndinendal avatar yanndinendal commented on July 19, 2024

Not wanting to implement every edge-case shouldn't prevent to handle common cases, right?

We can live with some differences with CommonMark, but breaking links due to a single underscore is a little harder to live with.

Can #101 be considered?

from snarkdown.

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.