# HTML comment tags break Markdown list indentation

**URL:** <https://talk.commonmark.org/t/html-comment-tags-break-markdown-list-indentation/4459>\
**Category:** Spec\
**Created:** [June 27, 2023, 3:19pm UTC](https://talk.commonmark.org/t/html-comment-tags-break-markdown-list-indentation/4459 "2023-06-27T15:19:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rokejulianlockhart](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/rokejulianlockhart/32/3399_2.png) [@rokejulianlockhart](https://talk.commonmark.org/u/rokejulianlockhart)\
**Post date:** [June 27, 2023, 3:19pm UTC](https://talk.commonmark.org/t/html-comment-tags-break-markdown-list-indentation/4459/1 "2023-06-27T15:19:21Z")

</div>

> <https://github.com/microsoft/vscode/issues/186232#issuecomment-1608402341>
>
> Does this issue occur when all extensions are disabled?: Yes
> 
> 
> 0. \*\*VS Code V…ersion\*\*
> 
> \`\`\`log
> rokejulianlockhart@RQN6C6:~\> code-insiders -v
> 1.80.0-insider
> 49b8e2d5410795e5a23a9c6b7f99b97f4afb4b47
> x64
> rokejulianlockhart@RQN6C6:~\>
> \`\`\`
> 
> 0. \*\*OS Version\*\*
> 
> \`\`\`log
> rokejulianlockhart@RQN6C6:~\> uname -a
> Linux RQN6C6 6.3.9-1-default #1 SMP PREEMPT\_DYNAMIC Thu Jun 22 03:53:43 UTC 2023 (0df701d) x86\_64 x86\_64 x86\_64 GNU/Linux
> rokejulianlockhart@RQN6C6:~\>
> \`\`\`
> 
> 0. \*\*Steps to Reproduce\*\*
> 
> \`\`\`markdown
> 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\](https://github.com/markdown-it/markdown-it/assets/42837531/702b502b-4cfd-4438-b9e8-73c4b8298aef)
> 	
> which is obviously wrong.
> 
> 0. \*\*Origin\*\*
> 	
> Due to https://github.com/microsoft/vscode/issues/184429#issuecomment-1585180018, reported at https://github.com/markdown-it/markdown-it/issues/942#issue-1775747088. Close if unnecessary to track here.

> [@rokejulianlockhart](#):
>
> > ****
> >
> > Does this issue occur when all extensions are disabled?: Yes
> > 
> > 1. VS Code Version:
> > 
> > 2. OS Version:
> 
> 1. **Steps to Reproduce:**

---

<div class="post-metadata">

**Author:** ![vas](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/vas/32/1267_2.png) [@vas](https://talk.commonmark.org/u/vas)\
**Post date:** [July 20, 2023, 1:14pm UTC](https://talk.commonmark.org/t/html-comment-tags-break-markdown-list-indentation/4459/2 "2023-07-20T13:14:46Z")

</div>

Markdown has no notion of comments and it supports HTML in a very limited and restricted way. What you describe as “obviously wrong” is would only be obviously wrong if the Markdown were embedded within HTML – i.e. if HTML was the primary syntax and Markdown was the secondary/foreign/embedded syntax.

But for Markdown and the CommonMark spec, that is not the case. It is the HTML that is embedded within the Markdown, it is the HTML that is foreign and secondary. Neither Markdown or CommonMark are trying to reimplement HTML, nor would it be a good idea.

Per the spec, HTML blocks are treated like any other block level element, including that they will interrupt lists, just as a block quote with the same indentation will.

If you still think this is a _ **bug** _, you should post it as an Issue against [the CommonMark spec](https://github.com/commonmark/commonmark-spec).

---

<div class="post-metadata">

**Author:** ![rokejulianlockhart](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/rokejulianlockhart/32/3399_2.png) [@rokejulianlockhart](https://talk.commonmark.org/u/rokejulianlockhart)\
**Post date:** [July 20, 2023, 11:55pm UTC](https://talk.commonmark.org/t/html-comment-tags-break-markdown-list-indentation/4459/3 "2023-07-20T23:55:02Z")

</div>

> [@vas](#):
>
> If you still think this is a _ **bug** _, you should post it as an Issue against [the CommonMark spec](https://github.com/commonmark/commonmark-spec).

> <https://github.com/commonmark/commonmark-spec/issues/741#issue-1814957180>
>
> 0. \*\*To reproduce\*\*
> 
> \`\`\`markdown
> 0. placeholder
> 	
> text
> 	
> 0. placehol…der
> 	
> 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\](https://github.com/markdown-it/markdown-it/assets/42837531/702b502b-4cfd-4438-b9e8-73c4b8298aef)
> 	
> in https://github.com/microsoft/vscode/issues/186232#issue-1775755236, which is obviously wrong.
> 
> 0. \*\*Alternatives\*\*
> 	
> I can't use
> 	
> \`\`\`markdown
> 	
> \`\`\`
> 	
> (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.
> 
> 0. \*\*Origin\*\*
> 
> Due to https://talk.commonmark.org/t/html-comment-tags-break-markdown-list-indentation/4459/2?u=rokejulianlockhart, reported here.
