Skip to content
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

HTML comment tags break Markdown list indentation. #741

Open
RokeJulianLockhart opened this issue Jul 20, 2023 · 2 comments
Open

HTML comment tags break Markdown list indentation. #741

RokeJulianLockhart opened this issue Jul 20, 2023 · 2 comments

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Jul 20, 2023

  1. To reproduce

    0. placeholder
    
    	text
    
    0. placeholder
    
    	text
    
    0. placeholder
    
    	text
    
    	0. placeholder
    
    		text
    
    	0. placeholder
    
    		text
    
    	0. placeholder
    
    		text
    
    		0. placeholder
    
    			text
    
    		0. placeholder
    
    			text
    
    		0. placeholder
    
    			text
    
    0. placeholder
    
    	text
    
    <!--
    
    0. placeholder
    
    	text
    
    -->
    
    0. placeholder
    
    	text
    
    	0. placeholder
    
    		text
    
    	<!--
    
    	0. placeholder
    
    		text
    
    	-->
    
    	0. placeholder
    
    		text
    
    		0. placeholder
    
    			text
    
    		<!--
    
    		0. placeholder
    
    			text
    
    		-->
    
    		0. placeholder
    
    			text

    (scroll) produces

    image

    in HTML comment tags break Markdown list indentation microsoft/vscode#186232 (comment), which is obviously wrong.

  2. Alternatives

    I can't use

    <!--- -->

    (per https://stackoverflow.com/a/4829998/9731176) since https://github.com/microsoft/vscode/ doesn't render them using whatever https://github.com/commonmark/commonmark-spec/ -compliant engine it uses.

  3. Origin

    Due to https://talk.commonmark.org/t/html-comment-tags-break-markdown-list-indentation/4459/2?u=rokejulianlockhart, reported here.

@wooorm
Copy link
Contributor

wooorm commented Jul 21, 2023

This is something people depend on to break adjacent lists (with CM you can now also do that by using a different bullet, as in . or ), but not all other markdown flavors support that)

@vassudanagunta
Copy link

The current user expectation is that block-level HTML content participates in the container hierarchy like any other block element. For example, an unindented HTML table is expected to be placed in the document root container, interrupting any preceding list just as the unindented HTML comment above does.

The OP's requested behavior would require special-casing HTML comments.

Not to mention upgrading HTML's role in Markdown, which I don't think is a good idea and goes against both the original and current intent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants