Skip to content

Commit e9e4829

Browse files
committed
fix: #568
1 parent 50ba9fc commit e9e4829

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

_test/extra.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,3 +883,18 @@ text" /></p>
883883
//- - - - - - - - -//
884884
<h1>A</h1>
885885
//= = = = = = = = = = = = = = = = = = = = = = = =//
886+
887+
71: Negative indentation with tabs in fenced code block
888+
OPTIONS: {"enableEscape": true}
889+
//- - - - - - - - -//
890+
*
891+
\t* \t~
892+
//- - - - - - - - -//
893+
<ul>
894+
<li>
895+
<ul>
896+
<li>~</li>
897+
</ul>
898+
</li>
899+
</ul>
900+
//= = = = = = = = = = = = = = = = = = = = = = = =//

parser/fcode_block.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ func (b *fencedCodeBlockParser) Trigger() []byte {
3535
func (b *fencedCodeBlockParser) Open(parent ast.Node, reader text.Reader, pc Context) (ast.Node, State) {
3636
line, segment := reader.PeekLine()
3737
pos := pc.BlockOffset()
38+
if pos < 0 || (line[pos] != '`' && line[pos] != '~') {
39+
return nil, NoChildren
40+
}
3841
findent := pos
3942
fenceChar := line[pos]
4043
i := pos

0 commit comments

Comments
 (0)