-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mdsf applies changes outside code snippet #138
Comments
I can confirm it only apply changes when the markdown code contains at least one code snippet This won't be altered
|
Hello @ccoVeille, glad to hear you like the idea! 😄 I just pushed a fix for the quote and ellipsis issue. The table formatting is a bit trickier, since it is caused by the markdown parser used (pulldown-cmark), not taking into account unnecessary spaces and For now your best option would be to enable a markdown formatter in your {
"markdown": {
"enabled": true,
"formatter": ["prettier"]
}
} |
You are parsing the markdown files via a lib to identity each code snippet in the markdown. But then, I assume you are replacing the markdown content in the parsed content, and generate the whole document from the parsed markdown. That's why it leads to changes. Would it be possible to "simply" (™️) replace the snippet zones as text in the markdown content you opened. Thanks for the setting, I'll try. Side note, I would have expected this setting to only apply on code snippet is markdown So something like that Here are how to make a document title in markdown
```markdown
# Title
``` All these put together, it could lead to have a way to format the markdown of the documents (so not the code snippets) only if requested (but it could be activated by default) |
Please note that current code also rewrite markdown such as 1. Foo
2. Bar To 1. Foo
1. Bar Or list from * Foo
* Bar To - Foo
- Bar And emphasis from Foo *bar* To Foo _bar_ Everything will be rendered the same way but then in a folder with many markdown files. Only the one containing code snippets you reordered will have these formatting. It would be strange, I think. |
Anyway, whatever you decide. I provided you some good content for unit tests 😅😁 |
I confirm the latest code fix the issue I raised, thanks a lot for taking into account |
Awesome! 😄
That is a very good point, I'll split it out to reduce any confusion 👍🏼 |
For records, it was applied here #143 |
I'm impressed by the amount of changes in so little time. |
I love your tool idea.
I can see you are actively working on it, so first of all, thank you !
Here are the kind of replacement I noticed
will become
The table formatting is broken. It will render OK in markdown, but the text was altered.
You might not notice at first but it replaces:
I would expect the code to only apply changes on the block quotes
The text was updated successfully, but these errors were encountered: