Comments (5)
Hi folks, any updates here? This is currently a bit of a deal breaker for me.
from mdformat.
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.
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.
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.
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)
- Support for Front Matter with Markdown page metadata HOT 1
- `--wrap n` should respect tables HOT 2
- Escape "\|" not working in table cell HOT 3
- Support XGG base directory specification for user configuration resolution
- Checkboxes are escaped HOT 3
- mdformat breaks Hugo shortcodes by escaping `<` HOT 5
- markdown-it-py 3 support
- Not Working In Python 3.11? HOT 5
- Error: Could not format HOT 2
- Alt text wrapped in grave marks is deleted HOT 2
- Formatted md renders different html than original md HOT 2
- image path is falsely patched with `<>` if URL includes `()`, breaks render HOT 5
- Double slash in math formular HOT 3
- Incorrecly reformats python code HOT 1
- convert inline links to references? HOT 2
- Support json schema
- Word-wrap on sentence (punctuation) and width. HOT 1
- Inline elements in image descriptions are flattened and stripped HOT 2
- Numbers in ordererd lists are ignored when using MDRenderer/MDFormat HOT 3
- Feature request: Respect .gitignore'd files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdformat.