@willbooster/tree-sitter-markdown 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -19,6 +19,8 @@ digits of an ordered list marker with `'0'` and `'9'` instead of calling `isdigi
|
|
|
19
19
|
own ABI number (`0x57420001`) and load only with that fork's runtime, version 2.0.0 or later: upstream's tree-sitter
|
|
20
20
|
runtime rejects them. They parse as the parsers in upstream's 0.5.3 packages do, with these exceptions:
|
|
21
21
|
|
|
22
|
+
- Block containers nest to a maximum depth of 255. Additional quote, list, code, or HTML block openers remain literal text inside the deepest container.
|
|
23
|
+
- Final headings, thematic breaks, empty list items, and opening code fences are recognized without a trailing newline.
|
|
22
24
|
- A closing code fence at the end of a file is recognized even without a trailing line ending.
|
|
23
25
|
- Trailing spaces and tabs at EOF are excluded from the preceding block’s inline range, as they are before a line ending.
|
|
24
26
|
- Ordered lists interrupt a paragraph only when their first marker is `1.` or `1)`.
|
package/package.json
CHANGED
|
@@ -103,32 +103,32 @@ module.exports = grammar({
|
|
|
103
103
|
_atx_heading1: $ => prec(1, seq(
|
|
104
104
|
$.atx_h1_marker,
|
|
105
105
|
optional($._atx_heading_content),
|
|
106
|
-
$._newline
|
|
106
|
+
choice($._newline, $._eof)
|
|
107
107
|
)),
|
|
108
108
|
_atx_heading2: $ => prec(1, seq(
|
|
109
109
|
$.atx_h2_marker,
|
|
110
110
|
optional($._atx_heading_content),
|
|
111
|
-
$._newline
|
|
111
|
+
choice($._newline, $._eof)
|
|
112
112
|
)),
|
|
113
113
|
_atx_heading3: $ => prec(1, seq(
|
|
114
114
|
$.atx_h3_marker,
|
|
115
115
|
optional($._atx_heading_content),
|
|
116
|
-
$._newline
|
|
116
|
+
choice($._newline, $._eof)
|
|
117
117
|
)),
|
|
118
118
|
_atx_heading4: $ => prec(1, seq(
|
|
119
119
|
$.atx_h4_marker,
|
|
120
120
|
optional($._atx_heading_content),
|
|
121
|
-
$._newline
|
|
121
|
+
choice($._newline, $._eof)
|
|
122
122
|
)),
|
|
123
123
|
_atx_heading5: $ => prec(1, seq(
|
|
124
124
|
$.atx_h5_marker,
|
|
125
125
|
optional($._atx_heading_content),
|
|
126
|
-
$._newline
|
|
126
|
+
choice($._newline, $._eof)
|
|
127
127
|
)),
|
|
128
128
|
_atx_heading6: $ => prec(1, seq(
|
|
129
129
|
$.atx_h6_marker,
|
|
130
130
|
optional($._atx_heading_content),
|
|
131
|
-
$._newline
|
|
131
|
+
choice($._newline, $._eof)
|
|
132
132
|
)),
|
|
133
133
|
_atx_heading_content: $ => prec(1, seq(
|
|
134
134
|
optional($._whitespace),
|
|
@@ -167,7 +167,7 @@ module.exports = grammar({
|
|
|
167
167
|
alias($._fenced_code_block_start_backtick, $.fenced_code_block_delimiter),
|
|
168
168
|
optional($._whitespace),
|
|
169
169
|
optional($.info_string),
|
|
170
|
-
$._newline,
|
|
170
|
+
choice($._newline, $._eof),
|
|
171
171
|
optional($.code_fence_content),
|
|
172
172
|
optional(seq(alias($._fenced_code_block_end_backtick, $.fenced_code_block_delimiter), $._close_block, choice($._newline, $._eof))),
|
|
173
173
|
$._block_close,
|
|
@@ -176,7 +176,7 @@ module.exports = grammar({
|
|
|
176
176
|
alias($._fenced_code_block_start_tilde, $.fenced_code_block_delimiter),
|
|
177
177
|
optional($._whitespace),
|
|
178
178
|
optional($.info_string),
|
|
179
|
-
$._newline,
|
|
179
|
+
choice($._newline, $._eof),
|
|
180
180
|
optional($.code_fence_content),
|
|
181
181
|
optional(seq(alias($._fenced_code_block_end_tilde, $.fenced_code_block_delimiter), $._close_block, choice($._newline, $._eof))),
|
|
182
182
|
$._block_close,
|
|
@@ -363,6 +363,7 @@ module.exports = grammar({
|
|
|
363
363
|
),
|
|
364
364
|
// List items are closed after two consecutive blank lines
|
|
365
365
|
_list_item_content: $ => choice(
|
|
366
|
+
$._eof,
|
|
366
367
|
prec(1, seq(
|
|
367
368
|
$._blank_line,
|
|
368
369
|
$._blank_line,
|
|
Binary file
|
|
Binary file
|