Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mdit_py_plugins/myst_blocks/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def line_comment(state: StateBlock, startLine: int, endLine: int, silent: bool)
pos = state.bMarks[nextLine] + state.tShift[nextLine]
maximum = state.eMarks[nextLine]

if state.sCount[nextLine] < state.blkIndent:
break
if state.src[pos] != "%":
break
token.content += "\n" + state.src[pos + 1 : maximum].rstrip()
Expand Down
12 changes: 12 additions & 0 deletions tests/fixtures/myst_block.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ def --><blockquote>
def -->
.

Multiline comment in list item:
.
- a
% abc
% def
.
<ul>
<li>a<!-- abc --></li>
</ul>
<!-- def -->
.


Indented by 4 spaces
.
Expand Down
Loading