@farvardin/lezer-parser-markdown 1.6.4 → 1.6.5
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/dist/index.cjs +9 -3
- package/dist/index.js +9 -3
- package/package.json +1 -1
- package/publish.sh +0 -0
- package/src/markdown.ts +13 -3
package/dist/index.cjs
CHANGED
|
@@ -346,13 +346,19 @@ function isOrderedList(line, cx, breaking) {
|
|
|
346
346
|
return -1;
|
|
347
347
|
return pos + 1 - line.pos;
|
|
348
348
|
}
|
|
349
|
+
// 35 #
|
|
350
|
+
// 61 =
|
|
349
351
|
function isAtxHeading(line) {
|
|
350
|
-
// /*
|
|
351
|
-
if (line.next != 61 || line.next != 35)
|
|
352
|
+
// if (line.next != 61 || line.next != 35 /* = or # */ ) return -1
|
|
353
|
+
if (line.next != 61 || line.next != 35 /* = or # */)
|
|
352
354
|
return -1;
|
|
353
355
|
let pos = line.pos + 1;
|
|
354
|
-
while (pos < line.text.length && line.text.charCodeAt(pos) == 61 || pos < line.text.length && line.text.charCodeAt(pos) == 35)
|
|
356
|
+
// while (pos < line.text.length && line.text.charCodeAt(pos) == 61 || pos < line.text.length && line.text.charCodeAt(pos) == 35) pos++
|
|
357
|
+
// while ((pos < line.text.length && line.text.charCodeAt(pos) == 61) || (pos < line.text.length && line.text.charCodeAt(pos) == 35)) pos++
|
|
358
|
+
while (pos < line.text.length &&
|
|
359
|
+
(line.text.charCodeAt(pos) === 61 || line.text.charCodeAt(pos) === 35)) {
|
|
355
360
|
pos++;
|
|
361
|
+
}
|
|
356
362
|
if (pos < line.text.length && line.text.charCodeAt(pos) != 32)
|
|
357
363
|
return -1;
|
|
358
364
|
let size = pos - line.pos;
|
package/dist/index.js
CHANGED
|
@@ -344,13 +344,19 @@ function isOrderedList(line, cx, breaking) {
|
|
|
344
344
|
return -1;
|
|
345
345
|
return pos + 1 - line.pos;
|
|
346
346
|
}
|
|
347
|
+
// 35 #
|
|
348
|
+
// 61 =
|
|
347
349
|
function isAtxHeading(line) {
|
|
348
|
-
// /*
|
|
349
|
-
if (line.next != 61 || line.next != 35)
|
|
350
|
+
// if (line.next != 61 || line.next != 35 /* = or # */ ) return -1
|
|
351
|
+
if (line.next != 61 || line.next != 35 /* = or # */)
|
|
350
352
|
return -1;
|
|
351
353
|
let pos = line.pos + 1;
|
|
352
|
-
while (pos < line.text.length && line.text.charCodeAt(pos) == 61 || pos < line.text.length && line.text.charCodeAt(pos) == 35)
|
|
354
|
+
// while (pos < line.text.length && line.text.charCodeAt(pos) == 61 || pos < line.text.length && line.text.charCodeAt(pos) == 35) pos++
|
|
355
|
+
// while ((pos < line.text.length && line.text.charCodeAt(pos) == 61) || (pos < line.text.length && line.text.charCodeAt(pos) == 35)) pos++
|
|
356
|
+
while (pos < line.text.length &&
|
|
357
|
+
(line.text.charCodeAt(pos) === 61 || line.text.charCodeAt(pos) === 35)) {
|
|
353
358
|
pos++;
|
|
359
|
+
}
|
|
354
360
|
if (pos < line.text.length && line.text.charCodeAt(pos) != 32)
|
|
355
361
|
return -1;
|
|
356
362
|
let size = pos - line.pos;
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
File without changes
|
package/src/markdown.ts
CHANGED
|
@@ -298,11 +298,21 @@ function isOrderedList(line: Line, cx: BlockContext, breaking: boolean) {
|
|
|
298
298
|
return pos + 1 - line.pos
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
+
// 35 #
|
|
302
|
+
// 61 =
|
|
303
|
+
|
|
301
304
|
function isAtxHeading(line: Line) {
|
|
302
|
-
// /*
|
|
303
|
-
if (line.next != 61 || line.next != 35) return -1
|
|
305
|
+
// if (line.next != 61 || line.next != 35 /* = or # */ ) return -1
|
|
306
|
+
if (line.next != 61 || line.next != 35 /* = or # */ ) return -1
|
|
304
307
|
let pos = line.pos + 1
|
|
305
|
-
while (pos < line.text.length && line.text.charCodeAt(pos) == 61 || pos < line.text.length && line.text.charCodeAt(pos) == 35) pos++
|
|
308
|
+
// while (pos < line.text.length && line.text.charCodeAt(pos) == 61 || pos < line.text.length && line.text.charCodeAt(pos) == 35) pos++
|
|
309
|
+
// while ((pos < line.text.length && line.text.charCodeAt(pos) == 61) || (pos < line.text.length && line.text.charCodeAt(pos) == 35)) pos++
|
|
310
|
+
while (
|
|
311
|
+
pos < line.text.length &&
|
|
312
|
+
(line.text.charCodeAt(pos) === 61 || line.text.charCodeAt(pos) === 35)
|
|
313
|
+
) {
|
|
314
|
+
pos++;
|
|
315
|
+
}
|
|
306
316
|
if (pos < line.text.length && line.text.charCodeAt(pos) != 32) return -1
|
|
307
317
|
let size = pos - line.pos
|
|
308
318
|
return size > 6 ? -1 : size
|