Skip to content

Commit 21a633b

Browse files
committed
fix: error for ASCII tables ("|foo bar|")
fix #36
1 parent 7fe12df commit 21a633b

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

corpus/taglink.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,16 @@ Note: ":autocmd" can...
9090
(block
9191
(line
9292
(word)
93-
(taglink
94-
(word)
95-
(MISSING "|"))
93+
(word)
94+
(ERROR
95+
(word))
9696
(word)
9797
(word))
9898
(line
99-
(word
100-
(MISSING "_word_common_token5")))
99+
(word))
101100
(line
102101
(word)
103-
(ERROR))
102+
(word))
104103
(line
105104
(word)
106105
(word)

grammar.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,9 @@ module.exports = grammar({
6767
seq("'", token.immediate(/[^'\n\t ]*[^'a-z\n\t ][^'\n\t ]*/), token.immediate("'")),
6868
// NOT optionlink: single char surrounded by "'".
6969
seq("'", token.immediate(/[^'\n\t ]/), token.immediate("'")),
70-
// NOT taglink: single "|".
71-
/\|[\t ]/,
72-
// NOT taglink: "|foo".
73-
seq('|', /[^|\n\t ]+/),
7470
// NOT taglink: "||".
7571
/\|\|*/,
72+
'|',
7673
// NOT listitem: "-" or "•" followed by tab.
7774
/[-]\t/,
7875
// NOT argument:

0 commit comments

Comments
 (0)