Skip to content

Commit 246a6f1

Browse files
committed
fix: #542
1 parent 2589b6a commit 246a6f1

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

extension/_test/table.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,3 +280,14 @@ Foo
280280
</ul>
281281
//= = = = = = = = = = = = = = = = = = = = = = = =//
282282

283+
14: Delimiter-like line inside a list item
284+
//- - - - - - - - -//
285+
- [Marketing](marketing/_index.md)
286+
--
287+
//- - - - - - - - -//
288+
<ul>
289+
<li><a href="marketing/_index.md">Marketing</a>
290+
--</li>
291+
</ul>
292+
//= = = = = = = = = = = = = = = = = = = = = = = =//
293+

extension/table.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,16 @@ func isTableDelim(bs []byte) bool {
125125
if w, _ := util.IndentWidth(bs, 0); w > 3 {
126126
return false
127127
}
128+
allSep := true
128129
for _, b := range bs {
130+
if b != '-' {
131+
allSep = false
132+
}
129133
if !(util.IsSpace(b) || b == '-' || b == '|' || b == ':') {
130134
return false
131135
}
132136
}
133-
return true
137+
return !allSep
134138
}
135139

136140
var tableDelimLeft = regexp.MustCompile(`^\s*\:\-+\s*$`)

0 commit comments

Comments
 (0)