@openclaw/discord 2026.10.5-beta.1 → 2026.10.5-beta.2
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/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/zlib.d.ts +6 -0
- package/node_modules/@types/ws/README.md +1 -1
- package/node_modules/@types/ws/index.d.mts +4 -0
- package/node_modules/@types/ws/index.d.ts +4 -0
- package/node_modules/@types/ws/package.json +3 -3
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/compile.js +14 -4
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/create-tokenizer.js +7 -6
- package/node_modules/micromark/dev/lib/initialize/document.js +25 -21
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/initialize/text.js +10 -6
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/preprocess.js +19 -21
- package/node_modules/micromark/lib/compile.d.ts.map +1 -1
- package/node_modules/micromark/lib/compile.js +37 -29
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -1
- package/node_modules/micromark/lib/create-tokenizer.js +37 -35
- package/node_modules/micromark/lib/initialize/document.js +21 -13
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -1
- package/node_modules/micromark/lib/initialize/text.js +7 -3
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -1
- package/node_modules/micromark/lib/preprocess.js +16 -19
- package/node_modules/micromark/package.json +2 -15
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +18 -24
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +1 -43
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +19 -43
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +2 -6
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +2 -53
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +14 -12
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +14 -5
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +14 -5
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +8 -5
- package/node_modules/micromark-core-commonmark/lib/attention.js +14 -24
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +1 -39
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +11 -29
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -6
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -51
- package/node_modules/micromark-core-commonmark/lib/label-end.js +11 -10
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +11 -3
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +11 -3
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +7 -5
- package/node_modules/micromark-core-commonmark/package.json +4 -16
- package/node_modules/micromark-factory-space/dev/index.d.ts +24 -1
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -1
- package/node_modules/micromark-factory-space/dev/index.js +58 -3
- package/node_modules/micromark-factory-space/index.d.ts +24 -1
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -1
- package/node_modules/micromark-factory-space/index.js +55 -3
- package/node_modules/micromark-factory-space/package.json +1 -10
- package/node_modules/micromark-factory-space/readme.md +25 -25
- package/node_modules/micromark-util-edit-map/dev/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/dev/index.js +237 -0
- package/node_modules/micromark-util-edit-map/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/index.js +225 -0
- package/node_modules/micromark-util-edit-map/license +22 -0
- package/node_modules/micromark-util-edit-map/package.json +48 -0
- package/node_modules/micromark-util-edit-map/readme.md +234 -0
- package/node_modules/micromark-util-types/index.d.ts +6 -3
- package/node_modules/micromark-util-types/package.json +2 -36
- package/package.json +4 -4
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 01 Oct 2026 22:35:12 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -3633,7 +3633,7 @@ declare module "node:crypto" {
|
|
|
3633
3633
|
hash: HashAlgorithmIdentifier;
|
|
3634
3634
|
length?: number;
|
|
3635
3635
|
}
|
|
3636
|
-
interface KangarooTwelveParams {
|
|
3636
|
+
interface KangarooTwelveParams extends Algorithm {
|
|
3637
3637
|
customization?: NodeJS.BufferSource;
|
|
3638
3638
|
outputLength: number;
|
|
3639
3639
|
}
|
|
@@ -3706,7 +3706,7 @@ declare module "node:crypto" {
|
|
|
3706
3706
|
interface RsaPssParams extends Algorithm {
|
|
3707
3707
|
saltLength: number;
|
|
3708
3708
|
}
|
|
3709
|
-
interface TurboShakeParams {
|
|
3709
|
+
interface TurboShakeParams extends Algorithm {
|
|
3710
3710
|
domainSeparation?: number;
|
|
3711
3711
|
outputLength: number;
|
|
3712
3712
|
}
|
|
@@ -284,7 +284,7 @@ declare module "node:dgram" {
|
|
|
284
284
|
* and the `'connect'` event is emitted on the next tick. Trying to call
|
|
285
285
|
* `connectSync()` on an already connected socket throws an
|
|
286
286
|
* `ERR_SOCKET_DGRAM_IS_CONNECTED` exception, and calling it while an
|
|
287
|
-
* asynchronous
|
|
287
|
+
* asynchronous `socket.bind()` is still in progress throws an
|
|
288
288
|
* `ERR_SOCKET_ALREADY_BOUND` exception.
|
|
289
289
|
*
|
|
290
290
|
* `address` must be a numeric IP literal; `connectSync()` never performs DNS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "26.6.
|
|
3
|
+
"version": "26.6.4",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -135,6 +135,6 @@
|
|
|
135
135
|
"undici-types": "~8.9.0"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {},
|
|
138
|
-
"typesPublisherContentHash": "
|
|
138
|
+
"typesPublisherContentHash": "6c3e6bb0de9116746132571c03cd320ed541b2c7576c42dd3c7fa509e3440b61",
|
|
139
139
|
"typeScriptVersion": "5.6"
|
|
140
140
|
}
|
|
@@ -94,6 +94,12 @@ declare module "node:zlib" {
|
|
|
94
94
|
* [Zstd parameters](https://nodejs.org/docs/latest-v26.x/api/zlib.html#zstd-constants).
|
|
95
95
|
*/
|
|
96
96
|
params?: { [key: number]: number | boolean } | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Expected total size of the uncompressed input. Must match the input size
|
|
99
|
+
* when compression finishes. Only applicable to Zstd compressors.
|
|
100
|
+
* @since v22.15.0
|
|
101
|
+
*/
|
|
102
|
+
pledgedSrcSize?: number | undefined;
|
|
97
103
|
/**
|
|
98
104
|
* Limits output size when using
|
|
99
105
|
* [convenience methods](https://nodejs.org/docs/latest-v26.x/api/zlib.html#convenience-methods).
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for ws (https://github.com/websockets/ws)
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Tue,
|
|
11
|
+
* Last updated: Tue, 29 Sep 2026 08:06:07 GMT
|
|
12
12
|
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -258,6 +258,8 @@ declare namespace WebSocket {
|
|
|
258
258
|
allowSynchronousEvents?: boolean | undefined;
|
|
259
259
|
autoPong?: boolean | undefined;
|
|
260
260
|
maxPayload?: number | undefined;
|
|
261
|
+
maxBufferedChunks?: number | undefined;
|
|
262
|
+
maxFragments?: number | undefined;
|
|
261
263
|
skipUTF8Validation?: boolean | undefined;
|
|
262
264
|
createConnection?: typeof createConnection | undefined;
|
|
263
265
|
finishRequest?: FinishRequestCallback | undefined;
|
|
@@ -343,6 +345,8 @@ declare namespace WebSocket {
|
|
|
343
345
|
clientTracking?: boolean | undefined;
|
|
344
346
|
perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
|
|
345
347
|
maxPayload?: number | undefined;
|
|
348
|
+
maxBufferedChunks?: number | undefined;
|
|
349
|
+
maxFragments?: number | undefined;
|
|
346
350
|
skipUTF8Validation?: boolean | undefined;
|
|
347
351
|
WebSocket?: U | undefined;
|
|
348
352
|
}
|
|
@@ -261,6 +261,8 @@ declare namespace WebSocket {
|
|
|
261
261
|
allowSynchronousEvents?: boolean | undefined;
|
|
262
262
|
autoPong?: boolean | undefined;
|
|
263
263
|
maxPayload?: number | undefined;
|
|
264
|
+
maxBufferedChunks?: number | undefined;
|
|
265
|
+
maxFragments?: number | undefined;
|
|
264
266
|
skipUTF8Validation?: boolean | undefined;
|
|
265
267
|
createConnection?: typeof createConnection | undefined;
|
|
266
268
|
finishRequest?: FinishRequestCallback | undefined;
|
|
@@ -344,6 +346,8 @@ declare namespace WebSocket {
|
|
|
344
346
|
clientTracking?: boolean | undefined;
|
|
345
347
|
perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
|
|
346
348
|
maxPayload?: number | undefined;
|
|
349
|
+
maxBufferedChunks?: number | undefined;
|
|
350
|
+
maxFragments?: number | undefined;
|
|
347
351
|
skipUTF8Validation?: boolean | undefined;
|
|
348
352
|
WebSocket?: U | undefined;
|
|
349
353
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/ws",
|
|
3
|
-
"version": "8.18.
|
|
3
|
+
"version": "8.18.2",
|
|
4
4
|
"description": "TypeScript definitions for ws",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,6 +67,6 @@
|
|
|
67
67
|
"@types/node": "*"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {},
|
|
70
|
-
"typesPublisherContentHash": "
|
|
71
|
-
"typeScriptVersion": "5.
|
|
70
|
+
"typesPublisherContentHash": "cc5646969f6447ed3bbda0af1afd034a06ea04a46c4e810b2f955450ac935f23",
|
|
71
|
+
"typeScriptVersion": "5.6"
|
|
72
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["compile.js"],"names":[],"mappings":"AA6DA;;;GAGG;AACH,kCAHW,cAAc,GAAG,IAAI,GAAG,SAAS,GAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["compile.js"],"names":[],"mappings":"AA6DA;;;GAGG;AACH,kCAHW,cAAc,GAAG,IAAI,GAAG,SAAS,GAC/B,OAAO,CA0kCnB;;YAzmCa,OAAO,GAAG,SAAS;cACnB,MAAM,GAAG,SAAS;YAClB,MAAM,GAAG,SAAS;kBAClB,MAAM,GAAG,SAAS;kBAClB,MAAM,GAAG,SAAS;YAClB,MAAM,GAAG,SAAS;;oCAVtB,sBAAsB;6BAAtB,sBAAsB"}
|
|
@@ -364,7 +364,7 @@ export function compile(options) {
|
|
|
364
364
|
} else {
|
|
365
365
|
containerBalance--
|
|
366
366
|
}
|
|
367
|
-
} else
|
|
367
|
+
} else {
|
|
368
368
|
switch (event[1].type) {
|
|
369
369
|
case types.listItemPrefix: {
|
|
370
370
|
if (event[0] === 'exit') {
|
|
@@ -396,6 +396,7 @@ export function compile(options) {
|
|
|
396
396
|
atMarker = undefined
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
+
}
|
|
399
400
|
}
|
|
400
401
|
|
|
401
402
|
slice[0][1]._loose = loose
|
|
@@ -431,7 +432,10 @@ export function compile(options) {
|
|
|
431
432
|
|
|
432
433
|
/** @type {CompileContext['tag']} */
|
|
433
434
|
function tag(value) {
|
|
434
|
-
if (!tags)
|
|
435
|
+
if (!tags) {
|
|
436
|
+
return
|
|
437
|
+
}
|
|
438
|
+
|
|
435
439
|
setData('lastWasTag', true)
|
|
436
440
|
buffers[buffers.length - 1].push(value)
|
|
437
441
|
}
|
|
@@ -689,7 +693,10 @@ export function compile(options) {
|
|
|
689
693
|
}
|
|
690
694
|
|
|
691
695
|
tag('</code></pre>')
|
|
692
|
-
if (count !== undefined && count < 2)
|
|
696
|
+
if (count !== undefined && count < 2) {
|
|
697
|
+
lineEndingIfNeeded()
|
|
698
|
+
}
|
|
699
|
+
|
|
693
700
|
setData('flowCodeSeenData')
|
|
694
701
|
setData('fencesCount')
|
|
695
702
|
setData('slurpOneLineEnding')
|
|
@@ -909,7 +916,10 @@ export function compile(options) {
|
|
|
909
916
|
*/
|
|
910
917
|
function onexitatxheadingsequence(token) {
|
|
911
918
|
// Exit for further sequences.
|
|
912
|
-
if (getData('headingRank'))
|
|
919
|
+
if (getData('headingRank')) {
|
|
920
|
+
return
|
|
921
|
+
}
|
|
922
|
+
|
|
913
923
|
setData('headingRank', this.sliceSerialize(token).length)
|
|
914
924
|
lineEndingIfNeeded()
|
|
915
925
|
tag('<h' + getData('headingRank') + '>')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-tokenizer.d.ts","sourceRoot":"","sources":["create-tokenizer.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;;;GAiBG;AACH,wCATW,YAAY,cAEZ,gBAAgB,SAEhB,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,GAAG,SAAS,GAEhD,eAAe,
|
|
1
|
+
{"version":3,"file":"create-tokenizer.d.ts","sourceRoot":"","sources":["create-tokenizer.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;;;GAiBG;AACH,wCATW,YAAY,cAEZ,gBAAgB,SAEhB,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,GAAG,SAAS,GAEhD,eAAe,CAqhB3B;;;;4BAjkBY,SAAS;;;;;;;;aAKR,OAAO;;;;UAEP,MAAM;;;;;uCAKT,SAAS,QAET,IAAI,KAEF,SAAS;kCAtBZ,sBAAsB;sCAAtB,sBAAsB;2BAAtB,sBAAsB;qCAAtB,sBAAsB;+BAAtB,sBAAsB"}
|
|
@@ -199,15 +199,12 @@ export function createTokenizer(parser, initialize, from) {
|
|
|
199
199
|
* Nothing.
|
|
200
200
|
*/
|
|
201
201
|
function main() {
|
|
202
|
-
/** @type {number} */
|
|
203
|
-
let chunkIndex
|
|
204
|
-
|
|
205
202
|
while (point._index < chunks.length) {
|
|
206
203
|
const chunk = chunks[point._index]
|
|
207
204
|
|
|
208
205
|
// If we’re in a buffer chunk, loop through it.
|
|
209
206
|
if (typeof chunk === 'string') {
|
|
210
|
-
chunkIndex = point._index
|
|
207
|
+
const chunkIndex = point._index
|
|
211
208
|
|
|
212
209
|
if (point._bufferIndex < 0) {
|
|
213
210
|
point._bufferIndex = 0
|
|
@@ -669,7 +666,7 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
669
666
|
|
|
670
667
|
if (typeof chunk === 'string') {
|
|
671
668
|
value = chunk
|
|
672
|
-
} else
|
|
669
|
+
} else {
|
|
673
670
|
switch (chunk) {
|
|
674
671
|
case codes.carriageReturn: {
|
|
675
672
|
value = values.cr
|
|
@@ -696,7 +693,10 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
696
693
|
}
|
|
697
694
|
|
|
698
695
|
case codes.virtualSpace: {
|
|
699
|
-
if (!expandTabs && atTab)
|
|
696
|
+
if (!expandTabs && atTab) {
|
|
697
|
+
continue
|
|
698
|
+
}
|
|
699
|
+
|
|
700
700
|
value = values.space
|
|
701
701
|
|
|
702
702
|
break
|
|
@@ -708,6 +708,7 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
708
708
|
value = String.fromCharCode(chunk)
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
+
}
|
|
711
712
|
|
|
712
713
|
atTab = chunk === codes.horizontalTab
|
|
713
714
|
result.push(value)
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import {ok as assert} from 'devlop'
|
|
21
21
|
import {factorySpace} from 'micromark-factory-space'
|
|
22
22
|
import {markdownLineEnding} from 'micromark-util-character'
|
|
23
|
-
import {
|
|
23
|
+
import {EditMap} from 'micromark-util-edit-map'
|
|
24
24
|
import {codes, constants, types} from 'micromark-util-symbol'
|
|
25
25
|
|
|
26
26
|
/** @type {InitialConstruct} */
|
|
@@ -128,16 +128,12 @@ function initializeDocument(effects) {
|
|
|
128
128
|
index++
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
const editMap = new EditMap()
|
|
131
132
|
// Inject the exits earlier (they’re still also at the end).
|
|
132
|
-
|
|
133
|
-
self.events,
|
|
134
|
-
indexBeforeFlow + 1,
|
|
135
|
-
0,
|
|
136
|
-
self.events.slice(indexBeforeExits)
|
|
137
|
-
)
|
|
138
|
-
|
|
133
|
+
editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits))
|
|
139
134
|
// Discard the duplicate exits.
|
|
140
|
-
|
|
135
|
+
editMap.add(indexBeforeExits, index - indexBeforeExits, [])
|
|
136
|
+
editMap.consume(self.events)
|
|
141
137
|
|
|
142
138
|
return checkNewContainers(code)
|
|
143
139
|
}
|
|
@@ -188,7 +184,10 @@ function initializeDocument(effects) {
|
|
|
188
184
|
|
|
189
185
|
/** @type {State} */
|
|
190
186
|
function thereIsANewContainer(code) {
|
|
191
|
-
if (childFlow)
|
|
187
|
+
if (childFlow) {
|
|
188
|
+
closeFlow()
|
|
189
|
+
}
|
|
190
|
+
|
|
192
191
|
exitContainers(continued)
|
|
193
192
|
return documentContinued(code)
|
|
194
193
|
}
|
|
@@ -230,7 +229,10 @@ function initializeDocument(effects) {
|
|
|
230
229
|
/** @type {State} */
|
|
231
230
|
function flowStart(code) {
|
|
232
231
|
if (code === codes.eof) {
|
|
233
|
-
if (childFlow)
|
|
232
|
+
if (childFlow) {
|
|
233
|
+
closeFlow()
|
|
234
|
+
}
|
|
235
|
+
|
|
234
236
|
exitContainers(0)
|
|
235
237
|
effects.consume(code)
|
|
236
238
|
return
|
|
@@ -279,9 +281,15 @@ function initializeDocument(effects) {
|
|
|
279
281
|
function writeToChild(token, endOfFile) {
|
|
280
282
|
assert(childFlow, 'expected `childFlow` to be defined when continuing')
|
|
281
283
|
const stream = self.sliceStream(token)
|
|
282
|
-
if (endOfFile)
|
|
284
|
+
if (endOfFile) {
|
|
285
|
+
stream.push(null)
|
|
286
|
+
}
|
|
287
|
+
|
|
283
288
|
token.previous = childToken
|
|
284
|
-
if (childToken)
|
|
289
|
+
if (childToken) {
|
|
290
|
+
childToken.next = token
|
|
291
|
+
}
|
|
292
|
+
|
|
285
293
|
childToken = token
|
|
286
294
|
childFlow.defineSkip(token.start)
|
|
287
295
|
childFlow.write(stream)
|
|
@@ -373,16 +381,12 @@ function initializeDocument(effects) {
|
|
|
373
381
|
index++
|
|
374
382
|
}
|
|
375
383
|
|
|
384
|
+
const editMap = new EditMap()
|
|
376
385
|
// Inject the exits earlier (they’re still also at the end).
|
|
377
|
-
|
|
378
|
-
self.events,
|
|
379
|
-
indexBeforeFlow + 1,
|
|
380
|
-
0,
|
|
381
|
-
self.events.slice(indexBeforeExits)
|
|
382
|
-
)
|
|
383
|
-
|
|
386
|
+
editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits))
|
|
384
387
|
// Discard the duplicate exits.
|
|
385
|
-
|
|
388
|
+
editMap.add(indexBeforeExits, index - indexBeforeExits, [])
|
|
389
|
+
editMap.consume(self.events)
|
|
386
390
|
}
|
|
387
391
|
}
|
|
388
392
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["text.js"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["text.js"],"names":[],"mappings":";;;AAgBA,sCAAiD;AACjD,oCAA6C;8BATnC,sBAAsB;sCAAtB,sBAAsB"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import {ok as assert} from 'devlop'
|
|
13
|
+
import {EditMap} from 'micromark-util-edit-map'
|
|
13
14
|
import {codes, constants, types} from 'micromark-util-symbol'
|
|
14
15
|
|
|
15
16
|
export const resolver = {resolveAll: createResolver()}
|
|
@@ -153,6 +154,7 @@ function createResolver(extraResolver) {
|
|
|
153
154
|
* @type {Resolver}
|
|
154
155
|
*/
|
|
155
156
|
function resolveAllLineSuffixes(events, context) {
|
|
157
|
+
const editMap = new EditMap()
|
|
156
158
|
let eventIndex = 0 // Skip first.
|
|
157
159
|
|
|
158
160
|
while (++eventIndex <= events.length) {
|
|
@@ -180,7 +182,10 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
180
182
|
bufferIndex--
|
|
181
183
|
}
|
|
182
184
|
|
|
183
|
-
if (bufferIndex)
|
|
185
|
+
if (bufferIndex) {
|
|
186
|
+
break
|
|
187
|
+
}
|
|
188
|
+
|
|
184
189
|
bufferIndex = -1
|
|
185
190
|
}
|
|
186
191
|
// Number
|
|
@@ -226,13 +231,10 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
226
231
|
if (data.start.offset === data.end.offset) {
|
|
227
232
|
Object.assign(data, token)
|
|
228
233
|
} else {
|
|
229
|
-
|
|
230
|
-
eventIndex,
|
|
231
|
-
0,
|
|
234
|
+
editMap.add(eventIndex, 0, [
|
|
232
235
|
['enter', token, context],
|
|
233
236
|
['exit', token, context]
|
|
234
|
-
)
|
|
235
|
-
eventIndex += 2
|
|
237
|
+
])
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
240
|
|
|
@@ -240,5 +242,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
240
242
|
}
|
|
241
243
|
}
|
|
242
244
|
|
|
245
|
+
editMap.consume(events)
|
|
246
|
+
|
|
243
247
|
return events
|
|
244
248
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["preprocess.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,8BAHa,YAAY,
|
|
1
|
+
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["preprocess.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,8BAHa,YAAY,CAoHxB;;;;mCAnIU,KAAK,aAEL,QAAQ,GAAG,IAAI,GAAG,SAAS,QAE3B,OAAO,GAAG,IAAI,GAAG,SAAS,KAExB,KAAK,CAAC,KAAK,CAAC;2BAZsB,sBAAsB;8BAAtB,sBAAsB;2BAAtB,sBAAsB"}
|
|
@@ -36,26 +36,15 @@ export function preprocess() {
|
|
|
36
36
|
/** @type {Preprocessor} */
|
|
37
37
|
// eslint-disable-next-line complexity
|
|
38
38
|
function preprocessor(value, encoding, end) {
|
|
39
|
-
/** @type {Array<Chunk>} */
|
|
40
|
-
const chunks = []
|
|
41
|
-
/** @type {RegExpMatchArray | null} */
|
|
42
|
-
let match
|
|
43
|
-
/** @type {number} */
|
|
44
|
-
let next
|
|
45
|
-
/** @type {number} */
|
|
46
|
-
let startPosition
|
|
47
|
-
/** @type {number} */
|
|
48
|
-
let endPosition
|
|
49
|
-
/** @type {Code} */
|
|
50
|
-
let code
|
|
51
|
-
|
|
52
39
|
value =
|
|
53
40
|
buffer +
|
|
54
41
|
(typeof value === 'string'
|
|
55
42
|
? value.toString()
|
|
56
43
|
: new TextDecoder(encoding || undefined).decode(value))
|
|
57
44
|
|
|
58
|
-
|
|
45
|
+
/** @type {Array<Chunk>} */
|
|
46
|
+
const chunks = []
|
|
47
|
+
let startPosition = 0
|
|
59
48
|
buffer = ''
|
|
60
49
|
|
|
61
50
|
if (start) {
|
|
@@ -69,10 +58,10 @@ export function preprocess() {
|
|
|
69
58
|
|
|
70
59
|
while (startPosition < value.length) {
|
|
71
60
|
search.lastIndex = startPosition
|
|
72
|
-
match = search.exec(value)
|
|
73
|
-
endPosition =
|
|
61
|
+
const match = search.exec(value)
|
|
62
|
+
const endPosition =
|
|
74
63
|
match && match.index !== undefined ? match.index : value.length
|
|
75
|
-
code = value.charCodeAt(endPosition)
|
|
64
|
+
const code = value.charCodeAt(endPosition)
|
|
76
65
|
|
|
77
66
|
if (!match) {
|
|
78
67
|
buffer = value.slice(startPosition)
|
|
@@ -106,9 +95,12 @@ export function preprocess() {
|
|
|
106
95
|
}
|
|
107
96
|
|
|
108
97
|
case codes.ht: {
|
|
109
|
-
next =
|
|
98
|
+
const next =
|
|
99
|
+
Math.ceil(column / constants.tabSize) * constants.tabSize
|
|
110
100
|
chunks.push(codes.horizontalTab)
|
|
111
|
-
while (column++ < next)
|
|
101
|
+
while (column++ < next) {
|
|
102
|
+
chunks.push(codes.virtualSpace)
|
|
103
|
+
}
|
|
112
104
|
|
|
113
105
|
break
|
|
114
106
|
}
|
|
@@ -131,8 +123,14 @@ export function preprocess() {
|
|
|
131
123
|
}
|
|
132
124
|
|
|
133
125
|
if (end) {
|
|
134
|
-
if (atCarriageReturn)
|
|
135
|
-
|
|
126
|
+
if (atCarriageReturn) {
|
|
127
|
+
chunks.push(codes.carriageReturn)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (buffer) {
|
|
131
|
+
chunks.push(buffer)
|
|
132
|
+
}
|
|
133
|
+
|
|
136
134
|
chunks.push(codes.eof)
|
|
137
135
|
}
|
|
138
136
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["compile.js"],"names":[],"mappings":"AA6DA;;;GAGG;AACH,kCAHW,cAAc,GAAG,IAAI,GAAG,SAAS,GAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["compile.js"],"names":[],"mappings":"AA6DA;;;GAGG;AACH,kCAHW,cAAc,GAAG,IAAI,GAAG,SAAS,GAC/B,OAAO,CA0kCnB;;YAzmCa,OAAO,GAAG,SAAS;cACnB,MAAM,GAAG,SAAS;YAClB,MAAM,GAAG,SAAS;kBAClB,MAAM,GAAG,SAAS;kBAClB,MAAM,GAAG,SAAS;YAClB,MAAM,GAAG,SAAS;;oCAVtB,sBAAsB;6BAAtB,sBAAsB"}
|
|
@@ -345,35 +345,37 @@ export function compile(options) {
|
|
|
345
345
|
} else {
|
|
346
346
|
containerBalance--;
|
|
347
347
|
}
|
|
348
|
-
} else
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
348
|
+
} else {
|
|
349
|
+
switch (event[1].type) {
|
|
350
|
+
case "listItemPrefix":
|
|
351
|
+
{
|
|
352
|
+
if (event[0] === 'exit') {
|
|
353
|
+
atMarker = true;
|
|
354
|
+
}
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
case "linePrefix":
|
|
358
|
+
{
|
|
359
|
+
// Ignore
|
|
360
|
+
|
|
361
|
+
break;
|
|
353
362
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
case "lineEndingBlank":
|
|
363
|
-
{
|
|
364
|
-
if (event[0] === 'enter' && !containerBalance) {
|
|
365
|
-
if (atMarker) {
|
|
366
|
-
atMarker = undefined;
|
|
367
|
-
} else {
|
|
368
|
-
loose = true;
|
|
363
|
+
case "lineEndingBlank":
|
|
364
|
+
{
|
|
365
|
+
if (event[0] === 'enter' && !containerBalance) {
|
|
366
|
+
if (atMarker) {
|
|
367
|
+
atMarker = undefined;
|
|
368
|
+
} else {
|
|
369
|
+
loose = true;
|
|
370
|
+
}
|
|
369
371
|
}
|
|
372
|
+
break;
|
|
370
373
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
374
|
+
default:
|
|
375
|
+
{
|
|
376
|
+
atMarker = undefined;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
377
379
|
}
|
|
378
380
|
}
|
|
379
381
|
slice[0][1]._loose = loose;
|
|
@@ -408,7 +410,9 @@ export function compile(options) {
|
|
|
408
410
|
|
|
409
411
|
/** @type {CompileContext['tag']} */
|
|
410
412
|
function tag(value) {
|
|
411
|
-
if (!tags)
|
|
413
|
+
if (!tags) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
412
416
|
setData('lastWasTag', true);
|
|
413
417
|
buffers[buffers.length - 1].push(value);
|
|
414
418
|
}
|
|
@@ -645,7 +649,9 @@ export function compile(options) {
|
|
|
645
649
|
lineEndingIfNeeded();
|
|
646
650
|
}
|
|
647
651
|
tag('</code></pre>');
|
|
648
|
-
if (count !== undefined && count < 2)
|
|
652
|
+
if (count !== undefined && count < 2) {
|
|
653
|
+
lineEndingIfNeeded();
|
|
654
|
+
}
|
|
649
655
|
setData('flowCodeSeenData');
|
|
650
656
|
setData('fencesCount');
|
|
651
657
|
setData('slurpOneLineEnding');
|
|
@@ -838,7 +844,9 @@ export function compile(options) {
|
|
|
838
844
|
*/
|
|
839
845
|
function onexitatxheadingsequence(token) {
|
|
840
846
|
// Exit for further sequences.
|
|
841
|
-
if (getData('headingRank'))
|
|
847
|
+
if (getData('headingRank')) {
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
842
850
|
setData('headingRank', this.sliceSerialize(token).length);
|
|
843
851
|
lineEndingIfNeeded();
|
|
844
852
|
tag('<h' + getData('headingRank') + '>');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-tokenizer.d.ts","sourceRoot":"","sources":["create-tokenizer.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;;;GAiBG;AACH,wCATW,YAAY,cAEZ,gBAAgB,SAEhB,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,GAAG,SAAS,GAEhD,eAAe,
|
|
1
|
+
{"version":3,"file":"create-tokenizer.d.ts","sourceRoot":"","sources":["create-tokenizer.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;;;GAiBG;AACH,wCATW,YAAY,cAEZ,gBAAgB,SAEhB,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,GAAG,SAAS,GAEhD,eAAe,CAqhB3B;;;;4BAjkBY,SAAS;;;;;;;;aAKR,OAAO;;;;UAEP,MAAM;;;;;uCAKT,SAAS,QAET,IAAI,KAEF,SAAS;kCAtBZ,sBAAsB;sCAAtB,sBAAsB;2BAAtB,sBAAsB;qCAAtB,sBAAsB;+BAAtB,sBAAsB"}
|