Skip to content

Commit 8df3266

Browse files
author
Christian Clason
authored
feat: conceal ~ in column heading #55
1 parent df0d90a commit 8df3266

File tree

4 files changed

+3926
-4784
lines changed

4 files changed

+3926
-4784
lines changed

grammar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ module.exports = grammar({
164164
// TODO: children should be $.word (plaintext), not $.atom.
165165
column_heading: ($) => seq(
166166
field('name', seq(choice($._atom_noli, $._uppercase_words), repeat($._atom))),
167-
/~\n/,
167+
'~',
168+
token.immediate('\n'),
168169
),
169170

170171
h1: ($) =>

queries/help/highlights.scm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
(h2) @text.title
33
(h3) @text.title
44
(column_heading) @text.title
5+
(column_heading
6+
"~" @conceal (#set! conceal ""))
57
(tag
68
"*" @conceal (#set! conceal "")
79
text: (_) @label)

src/grammar.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,15 @@
682682
}
683683
},
684684
{
685-
"type": "PATTERN",
686-
"value": "~\\n"
685+
"type": "STRING",
686+
"value": "~"
687+
},
688+
{
689+
"type": "IMMEDIATE_TOKEN",
690+
"content": {
691+
"type": "STRING",
692+
"value": "\n"
693+
}
687694
}
688695
]
689696
},

0 commit comments

Comments
 (0)