Skip to content

Commit 6c9251c

Browse files
committed
cleanup
- redundant choice() - unneeded "NOT listitem" spec: `_li_token` is already defined explicitly in terms of space char.
1 parent e9b4d2b commit 6c9251c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

grammar.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = grammar({
3434
// "foo({a})" parse as "(word) (argument)" instead of "(word)".
3535
token(prec(-1, /[^\n\t{ ][^\n\t ]*/)),
3636
token(prec(-2, /[^\n\t ]+/)),
37-
choice($._word_common),
37+
$._word_common,
3838
),
3939

4040
_atom_noli: ($) => prec(1, choice(
@@ -45,7 +45,7 @@ module.exports = grammar({
4545
// Lines contained by line_li must not start with a listitem symbol.
4646
token(prec(-1, /[^-*+\n\t ][^\n\t ]*/)),
4747
token(prec(-1, /[-*+][^\n\t ]+/)),
48-
choice($._word_common),
48+
$._word_common,
4949
)),
5050

5151
_atom_common: ($) =>
@@ -72,8 +72,6 @@ module.exports = grammar({
7272
// NOT taglink: "||", "|"
7373
/\|\|+/,
7474
'|',
75-
// NOT listitem: "-" or "•" followed by tab.
76-
/[-]\t/,
7775
// NOT argument:
7876
'{',
7977
'}',

0 commit comments

Comments
 (0)