Skip to content

Commit 8608da5

Browse files
committed
fixup: delimiters
1 parent bf52536 commit 8608da5

File tree

6 files changed

+44
-30
lines changed

6 files changed

+44
-30
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ module.exports = grammar({
178178
// TODO: children should be $.word (plaintext), not $.atom.
179179
column_heading: ($) => seq(
180180
alias(seq(choice($._atom_noli, $._uppercase_words), repeat($._atom)), $.heading),
181-
'~',
181+
alias('~', $.delimiter),
182182
token.immediate('\n'),
183183
),
184184

queries/vimdoc/highlights.scm

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
(h1) @markup.heading.1
1+
(h1
2+
(delimiter) @markup.heading.1
3+
(heading) @markup.heading.1)
24

3-
(h2) @markup.heading.2
5+
(h2
6+
(delimiter) @markup.heading.2
7+
(heading) @markup.heading.2)
48

5-
(h3) @markup.heading.3
9+
(h3
10+
(heading) @markup.heading.3)
611

7-
(column_heading) @markup.heading.4
12+
(column_heading
13+
(heading) @markup.heading.4)
814

915
(column_heading
10-
"~" @markup.heading.4.marker
16+
(delimiter) @markup.heading.4.marker
1117
(#set! conceal ""))
1218

1319
(tag

src/grammar.json

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser.c

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/corpus/heading3-column_heading.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Text
2424
(column_heading
2525
(heading
2626
(word)
27-
(word))))
27+
(word))
28+
(delimiter)))
2829
(line
2930
(word))))
3031

@@ -83,7 +84,8 @@ Below
8384
(line
8485
(column_heading
8586
(heading
86-
(word)))))
87+
(word))
88+
(delimiter))))
8789
(block
8890
(line
8991
(word))))
@@ -127,7 +129,8 @@ nvim_ui_try_resize({width}, {height}) *nvim_ui_try_resize()*
127129
(heading
128130
(word))
129131
(heading
130-
(word)))))
132+
(word))
133+
(delimiter))))
131134
(block
132135
(line
133136
(word)
@@ -147,7 +150,8 @@ nvim_ui_try_resize({width}, {height}) *nvim_ui_try_resize()*
147150
(line
148151
(column_heading
149152
(heading
150-
(word))))
153+
(word))
154+
(delimiter)))
151155
(line
152156
(taglink
153157
(word))
@@ -181,7 +185,8 @@ column_heading should NOT parse atoms (links, tags, etc.) (FIXME)
181185
(heading
182186
(word)
183187
(optionlink
184-
(word))))))
188+
(word)))
189+
(delimiter))))
185190
(block
186191
(line
187192
(word))))

0 commit comments

Comments
 (0)