Giter VIP home page Giter VIP logo

Comments (8)

tripodsan avatar tripodsan commented on May 14, 2024 1

thanks for your answer and patience.

from micromark.

ChristianMurphy avatar ChristianMurphy commented on May 14, 2024

This isn't a regression this is to spec
https://spec.commonmark.org/dingus/?text=%3e%20%5b!note%5d%0a%3e%20this%20is%20a%20note.%20who%27d%20have%20noted%3f

from micromark.

tripodsan avatar tripodsan commented on May 14, 2024

This isn't a regression this is to spec

well, depends how you look at it :-)

of course, the transformation of that markdown to HTML (or whatever) can still be according to spec (i.e. just rendering the [!Note] if the definition is not set).

IMO the parser should not throw away the semantic information of the potential link reference.

this was the behaviour in the previous remark parser: mdast contains the link reference, but remark-stringify renders the plain link text if the definition is not present.

from micromark.

wooorm avatar wooorm commented on May 14, 2024

well, depends how you look at it :-)

Every change can be seen as a “regression” if you look at it negatively, but if you look at it positively, it’s a fix. This is documented in the remark changelog: https://github.com/remarkjs/remark/releases. It is the biggest change, and I’ve discussed in with many different folks. I’ve also raised several issues with CommonMark. As this is emphasis: [text *emphasis start][undefined] emphasis end*, we can’t do what we did before / you want, while supporting CommonMark.

from micromark.

tripodsan avatar tripodsan commented on May 14, 2024

we can’t do what we did before / you want, while supporting CommonMark.

I understand. but the emphasis example is probably an edge case :-), where having a link reference with a non definition not so much.

would it be possible to make it configurable?

from micromark.

wooorm avatar wooorm commented on May 14, 2024

It’s the same, because you want it to be a link reference without a definition, and I want it emphasis.
Anyway, it gets way more confusing, see the tests:

.

Would it be possible to make it configurable?

What’s the benefit of non-standard markdown? Why do you want that? Or this particularly? How would it work in the example I posted before, or with the other cases in the tests?

See also: micromark/common-markup-state-machine#14

from micromark.

tripodsan avatar tripodsan commented on May 14, 2024

What’s the benefit of non-standard markdown?

where in the standard is it defined that link references must have a valid definition?

Why do you want that? Or this particularly?

to ease the transition to the new version :-) i guess the best is to write an extension that detects the [!abc] links (similar to footnotes)

How would it work in the example I posted before, or with the other cases in the tests?

it wouldn't :-)

from micromark.

wooorm avatar wooorm commented on May 14, 2024

where in the standard is it defined that link references must have a valid definition?

The required matching is described here: https://spec.commonmark.org/0.29/#reference-link

to ease the transition to the new version :-)

What is the benefit of a slow tradition instead of ripping the bandaid off and conforming to other markdown parsers?

i guess the best is to write an extension that detects the [!abc] links (similar to footnotes)

Yes, that might work!

While extensions are possible my personal opinion is that extensions are bad for the language. It won’t render here on GitHub. It creates lock-in: folks can’t export their “markdown” because it doesn’t render anywhere else. If you really really need to do it, maybe directives are an option. Several projects are going in that direction.

from micromark.

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.