Formatting in markdown cannot be ignored in all cases
See original GitHub issuePrettier 1.19.1 Playground link
Input:
## Documentation Overview
{:.no_toc}
- TOC
{:toc}
Output:
## Documentation Overview
{:.no_toc}
- TOC
{:toc}
Expected behavior:
Output:
## Documentation Overview
{:.no_toc}
- TOC
{:toc}
The formatter currently changes the behavior. The prettified version doesn’t render the same.
Ignoring ranges also does not work because of https://github.com/prettier/prettier/issues/5557
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Markdown syntax causing issues - Atlassian Community
1 answer · Use a backslash to escape the hash - markdown will ignore the next "formatting" character after the \ character. ·...
Read more >How do I ensure that whitespace is preserved in Markdown?
To preserve spaces in a markdown document use a non-breaking space: "a space character that prevents consecutive whitespace characters from ...
Read more >Handbook Markdown Guide - GitLab
Emphasis: bold and italic To display bold or italic text, wrap it in 2 stars (for bold) or underscores (for italic). For both...
Read more >Markdown Content Help File Format - GitHub Pages
The Markdown help format is used to produce content that can be viewed on ... HTML list items and table cells elements) may...
Read more >Markdown for customers - Zendesk help
Formatting helps customers such as myself document reported issues. I'm trying to describe very arcane issues to GitHub Enterprise Support with ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see. I’ve been writing HTML and Markdown for years and didn’t realize the issue since markdown doesn’t have closing tags. I can’t think of a good way to phrase this for the docs but will send a PR if I come up with something.
That’s how markdown works. You tried to put the closing comment inside the list.
It’d be easy to understand if we draw an analogy with HTML:
If you know how to describe this in the docs to avoid confusion in the future I’d be happy to review a PR.