Skip to content

Commit ac43db8

Browse files
tamoTamotsu Takahashi
authored andcommitted
Fix matchInContainer false positives
The function should match only the beginnings of lines. For example, see this testcase: ``` :::spoiler here is a ::: ::: ::: ``` The last line should be completed. Without this patch, the third line is completed and the last is not. Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
1 parent cebd5e7 commit ac43db8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3137,7 +3137,7 @@ function checkInContainerSyntax () {
31373137

31383138
function matchInContainer (text) {
31393139
var match
3140-
match = text.match(/:{3,}/g)
3140+
match = text.match(/(^|\n):::/gm)
31413141
if (match && match.length % 2) {
31423142
return true
31433143
} else {

0 commit comments

Comments
 (0)