88// - Rules starting with underscore are hidden in the syntax tree.
99
1010const _uppercase_word = / [ A - Z 0 - 9 . ( ) ] [ - A - Z 0 - 9 . ( ) _ ] + / ;
11- const _li_token = / [ - * + • ] [ ] + / ;
11+ const _li_token = / [ - • ] [ ] + / ;
1212
1313module . exports = grammar ( {
1414 name : 'vimdoc' ,
@@ -27,7 +27,7 @@ module.exports = grammar({
2727
2828 _atom : ( $ ) => choice (
2929 $ . word ,
30- $ . _atom_common
30+ $ . _atom_common ,
3131 ) ,
3232 word : ( $ ) => choice (
3333 // Try the more-restrictive pattern at higher relative precedence, so that things like
@@ -39,12 +39,12 @@ module.exports = grammar({
3939
4040 _atom_noli : ( $ ) => prec ( 1 , choice (
4141 alias ( $ . word_noli , $ . word ) ,
42- $ . _atom_common
42+ $ . _atom_common ,
4343 ) ) ,
4444 word_noli : ( $ ) => prec ( 1 , choice (
4545 // Lines contained by line_li must not start with a listitem symbol.
46- token ( prec ( - 1 , / [ ^ - * + • \n \t ] [ ^ \n \t ] * / ) ) ,
47- token ( prec ( - 1 , / [ - * + • ] [ ^ \n \t ] + / ) ) ,
46+ token ( prec ( - 1 , / [ ^ - • \n \t ] [ ^ \n \t ] * / ) ) ,
47+ token ( prec ( - 1 , / [ - • ] [ ^ \n \t ] + / ) ) ,
4848 $ . _word_common ,
4949 ) ) ,
5050
@@ -61,13 +61,15 @@ module.exports = grammar({
6161
6262 // Explicit special cases: these are plaintext, not errors.
6363 _word_common : ( ) => choice (
64+ // NOT tag: isolated "*".
65+ / \* [ \n \t ] / ,
6466 // NOT optionlink: '
6567 "'" ,
6668 // NOT optionlink: 'x
6769 seq ( "'" , token . immediate ( / [ ^ ' \n \t ] / ) ) ,
68- // NOT optionlink: followed by non-lowercase char.
70+ // NOT optionlink: 'X ( non-lowercase char) .
6971 seq ( "'" , token . immediate ( / [ a - z ] * [ ^ ' a - z \n \t ] [ a - z ] * / ) , optional ( token . immediate ( "'" ) ) ) ,
70- // NOT optionlink: single char surrounded by "'" .
72+ // NOT optionlink: 'x' ( single char) .
7173 seq ( "'" , token . immediate ( / [ ^ ' \n \t ] / ) , token . immediate ( "'" ) ) ,
7274 // NOT taglink: "||", "|"
7375 / \| \| + / ,
0 commit comments