Skip to content

Commit 98ccbbb

Browse files
committed
fixup: column_heading
1 parent 8608da5 commit 98ccbbb

File tree

4 files changed

+3524
-3664
lines changed

4 files changed

+3524
-3664
lines changed

grammar.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ const _li_token = /[-•][ ]+/;
1616
module.exports = grammar({
1717
name: 'vimdoc',
1818

19+
conflicts: $ => [
20+
[$._line_noli, $._column_heading],
21+
[$._column_heading],
22+
],
23+
1924
extras: () => [/[\t ]/],
2025

2126
// inline: ($) => [
@@ -177,10 +182,14 @@ module.exports = grammar({
177182
// Intended for table column names per `:help help-writing`.
178183
// TODO: children should be $.word (plaintext), not $.atom.
179184
column_heading: ($) => seq(
180-
alias(seq(choice($._atom_noli, $._uppercase_words), repeat($._atom)), $.heading),
185+
alias($._column_heading, $.heading),
181186
alias('~', $.delimiter),
182-
token.immediate('\n'),
187+
token.immediate(/\n/),
183188
),
189+
_column_heading: $ => prec.dynamic(1, seq(
190+
choice($._atom_noli, $._uppercase_words),
191+
repeat($._atom)
192+
)),
184193

185194
h1: ($) =>
186195
prec(1, seq(

src/grammar.json

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

0 commit comments

Comments
 (0)