Giter VIP home page Giter VIP logo

Comments (5)

adriangb avatar adriangb commented on May 20, 2024 3

Hi folks, any updates here? This is currently a bit of a deal breaker for me.

from mdformat.

hukkin avatar hukkin commented on May 20, 2024 1

No one is currently working on this to my knowledge.

It seems you also need support for the non-standard admonition syntax, so seems like a plugin that brings support for that syntax would help you as well.

from mdformat.

zhouzaida avatar zhouzaida commented on May 20, 2024 1

Hi @jamescurtin and thanks for the issue!

I like the feature.

Some notes/thoughts regarding implementation already 😄

  • reference links (spanning in and out of the ignored block) could be problematic
  • I think deciding what to ignore has to happen after parsing. Doing so before parser is problematic because, e.g. there is no ignore block in the MD below, and it's difficult to know that without parsing:
    <!-- mdformat ignore start -->
    
  • The token stream the renderer currently receives is abstract, not concrete syntax. The renderer doesn't know the original formatting. One way or the other it would have to I guess.

I'm expecting a bug free implementation could be quite hard to come up with. A plugin that brings formatting support for admonition (that you mentioned) might be easier (although not as general solution ofc).

It looks like there's a similar discussion happening on an existing PR about how to ignore blocks of code.

This discussion is related to ignoring stuff from a safeguard that ensures mdformat does not alter markdown AST. All markdown is still formatted, so it's not really the same thing.

Hi @hukkin , is there any progress to support the feature?

from mdformat.

welcome avatar welcome commented on May 20, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

from mdformat.

hukkin avatar hukkin commented on May 20, 2024

Hi @jamescurtin and thanks for the issue!

I like the feature.

Some notes/thoughts regarding implementation already 😄

  • reference links (spanning in and out of the ignored block) could be problematic
  • I think deciding what to ignore has to happen after parsing. Doing so before parser is problematic because, e.g. there is no ignore block in the MD below, and it's difficult to know that without parsing:
    <!-- mdformat ignore start -->
    ```
    <!-- mdformat ignore end -->
    ```
  • The token stream the renderer currently receives is abstract, not concrete syntax. The renderer doesn't know the original formatting. One way or the other it would have to I guess.

I'm expecting a bug free implementation could be quite hard to come up with. A plugin that brings formatting support for admonition (that you mentioned) might be easier (although not as general solution ofc).

It looks like there's a similar discussion happening on an existing PR about how to ignore blocks of code.

This discussion is related to ignoring stuff from a safeguard that ensures mdformat does not alter markdown AST. All markdown is still formatted, so it's not really the same thing.

from mdformat.

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.