Skip to content

Commit d5c4125

Browse files
authored
bugfix: overtracking display math state in scanner (#85)
1 parent f53a558 commit d5c4125

File tree

8 files changed

+49977
-42351
lines changed

8 files changed

+49977
-42351
lines changed

crates/quarto-markdown-pandoc/resources/error-corpus/_autogen-table.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
{
128128
"column": 3,
129129
"row": 0,
130-
"state": 934,
130+
"state": 919,
131131
"sym": "{",
132132
"errorInfo": {
133133
"code": "Q-2-4",
@@ -136,15 +136,15 @@
136136
"captures": [
137137
{
138138
"column": 0,
139-
"lrState": 934,
139+
"lrState": 919,
140140
"row": 0,
141141
"size": 3,
142142
"sym": "_fenced_div_start",
143143
"label": "fence-start"
144144
},
145145
{
146146
"column": 3,
147-
"lrState": 689,
147+
"lrState": 697,
148148
"row": 0,
149149
"size": 1,
150150
"sym": "{",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
source: crates/quarto-markdown-pandoc/tests/test.rs
3+
expression: output
4+
---
5+
[ Para [Str "a", Space, Code ( "" , [] , [] ) "$$", Space, Str "b"], BulletList [[BulletList [[Plain [Str "c"]], [Plain [Str "d"]]]]] ]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
a `$$` b
2+
3+
* * c
4+
* d

crates/tree-sitter-qmd/tree-sitter-markdown/grammar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ module.exports = grammar({
413413
$.raw_specifier,
414414
$._autolink,
415415
$._escaped_characters,
416+
$._pipe_table_code_span,
416417
'[>>', // this needs to be accepted for highlights in editorial comments
417418
),
418419

crates/tree-sitter-qmd/tree-sitter-markdown/log.html

Lines changed: 7607 additions & 1124 deletions
Large diffs are not rendered by default.

crates/tree-sitter-qmd/tree-sitter-markdown/src/grammar.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3229,6 +3229,10 @@
32293229
"type": "SYMBOL",
32303230
"name": "_escaped_characters"
32313231
},
3232+
{
3233+
"type": "SYMBOL",
3234+
"name": "_pipe_table_code_span"
3235+
},
32323236
{
32333237
"type": "STRING",
32343238
"value": "[>>"

0 commit comments

Comments
 (0)