@tickernelz/paperclip-pro-server 2026.926.2 → 2026.926.3
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/build-info.json +1 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +18 -4
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/issues.d.ts.map +1 -1
- package/dist/routes/issues.js +7 -0
- package/dist/routes/issues.js.map +1 -1
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +21 -8
- package/dist/routes/openapi.js.map +1 -1
- package/dist/routes/paperclip-mcp.d.ts.map +1 -1
- package/dist/routes/paperclip-mcp.js +23 -2
- package/dist/routes/paperclip-mcp.js.map +1 -1
- package/dist/services/issues.d.ts +5 -0
- package/dist/services/issues.d.ts.map +1 -1
- package/dist/services/issues.js +15 -1
- package/dist/services/issues.js.map +1 -1
- 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/node_modules/ws/lib/websocket.js +17 -3
- package/node_modules/ws/package.json +1 -1
- package/package.json +20 -20
- package/skills/paperclip/references/api-reference.md +2 -2
- package/ui-dist/assets/{Agents.production-5Tba_pW_.js → Agents.production-BGeWxNtU.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-CONFWTe1.js → CompanyActivity.production-9gzPo_M_.js} +1 -1
- package/ui-dist/assets/{CompanyExport-CiOVCS4y.js → CompanyExport-CwCAJj2l.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-gv4ej6PI.js → CompanySkills.production-CiTG4koz.js} +1 -1
- package/ui-dist/assets/{Costs.production-C6rOIGNV.js → Costs.production-CFn4Pjkh.js} +1 -1
- package/ui-dist/assets/{OrgChart.production-DYeuFtY_.js → OrgChart.production-U1cB4YS_.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-Bt4IHfSD.js → RoutineDetail.production-oI3mHlKM.js} +1 -1
- package/ui-dist/assets/{Routines.production-BBxSwg2A.js → Routines.production-sl1FiAYd.js} +1 -1
- package/ui-dist/assets/{definition-B49KTmLW.js → definition-DrGsWdJY.js} +1 -1
- package/ui-dist/assets/{index-BRCs87uX.js → index-cwemnRTq.js} +144 -144
- package/ui-dist/index.html +1 -1
- package/ui-dist/sw.js +1 -1
|
@@ -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"}
|
|
@@ -201,14 +201,12 @@ export function createTokenizer(parser, initialize, from) {
|
|
|
201
201
|
* Nothing.
|
|
202
202
|
*/
|
|
203
203
|
function main() {
|
|
204
|
-
/** @type {number} */
|
|
205
|
-
let chunkIndex;
|
|
206
204
|
while (point._index < chunks.length) {
|
|
207
205
|
const chunk = chunks[point._index];
|
|
208
206
|
|
|
209
207
|
// If we’re in a buffer chunk, loop through it.
|
|
210
208
|
if (typeof chunk === 'string') {
|
|
211
|
-
chunkIndex = point._index;
|
|
209
|
+
const chunkIndex = point._index;
|
|
212
210
|
if (point._bufferIndex < 0) {
|
|
213
211
|
point._bufferIndex = 0;
|
|
214
212
|
}
|
|
@@ -571,38 +569,42 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
571
569
|
let value;
|
|
572
570
|
if (typeof chunk === 'string') {
|
|
573
571
|
value = chunk;
|
|
574
|
-
} else
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
572
|
+
} else {
|
|
573
|
+
switch (chunk) {
|
|
574
|
+
case -5:
|
|
575
|
+
{
|
|
576
|
+
value = "\r";
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
case -4:
|
|
580
|
+
{
|
|
581
|
+
value = "\n";
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
case -3:
|
|
585
|
+
{
|
|
586
|
+
value = "\r" + "\n";
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
589
|
+
case -2:
|
|
590
|
+
{
|
|
591
|
+
value = expandTabs ? " " : "\t";
|
|
592
|
+
break;
|
|
593
|
+
}
|
|
594
|
+
case -1:
|
|
595
|
+
{
|
|
596
|
+
if (!expandTabs && atTab) {
|
|
597
|
+
continue;
|
|
598
|
+
}
|
|
599
|
+
value = " ";
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
default:
|
|
603
|
+
{
|
|
604
|
+
// Currently only replacement character.
|
|
605
|
+
value = String.fromCharCode(chunk);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
606
608
|
}
|
|
607
609
|
atTab = chunk === -2;
|
|
608
610
|
result.push(value);
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import { factorySpace } from 'micromark-factory-space';
|
|
21
21
|
import { markdownLineEnding } from 'micromark-util-character';
|
|
22
|
-
import {
|
|
22
|
+
import { EditMap } from 'micromark-util-edit-map';
|
|
23
23
|
/** @type {InitialConstruct} */
|
|
24
24
|
export const document = {
|
|
25
25
|
tokenize: initializeDocument
|
|
@@ -108,12 +108,12 @@ function initializeDocument(effects) {
|
|
|
108
108
|
};
|
|
109
109
|
index++;
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
const editMap = new EditMap();
|
|
112
112
|
// Inject the exits earlier (they’re still also at the end).
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
115
114
|
// Discard the duplicate exits.
|
|
116
|
-
|
|
115
|
+
editMap.add(indexBeforeExits, index - indexBeforeExits, []);
|
|
116
|
+
editMap.consume(self.events);
|
|
117
117
|
return checkNewContainers(code);
|
|
118
118
|
}
|
|
119
119
|
return start(code);
|
|
@@ -156,7 +156,9 @@ function initializeDocument(effects) {
|
|
|
156
156
|
|
|
157
157
|
/** @type {State} */
|
|
158
158
|
function thereIsANewContainer(code) {
|
|
159
|
-
if (childFlow)
|
|
159
|
+
if (childFlow) {
|
|
160
|
+
closeFlow();
|
|
161
|
+
}
|
|
160
162
|
exitContainers(continued);
|
|
161
163
|
return documentContinued(code);
|
|
162
164
|
}
|
|
@@ -186,7 +188,9 @@ function initializeDocument(effects) {
|
|
|
186
188
|
/** @type {State} */
|
|
187
189
|
function flowStart(code) {
|
|
188
190
|
if (code === null) {
|
|
189
|
-
if (childFlow)
|
|
191
|
+
if (childFlow) {
|
|
192
|
+
closeFlow();
|
|
193
|
+
}
|
|
190
194
|
exitContainers(0);
|
|
191
195
|
effects.consume(code);
|
|
192
196
|
return;
|
|
@@ -230,9 +234,13 @@ function initializeDocument(effects) {
|
|
|
230
234
|
*/
|
|
231
235
|
function writeToChild(token, endOfFile) {
|
|
232
236
|
const stream = self.sliceStream(token);
|
|
233
|
-
if (endOfFile)
|
|
237
|
+
if (endOfFile) {
|
|
238
|
+
stream.push(null);
|
|
239
|
+
}
|
|
234
240
|
token.previous = childToken;
|
|
235
|
-
if (childToken)
|
|
241
|
+
if (childToken) {
|
|
242
|
+
childToken.next = token;
|
|
243
|
+
}
|
|
236
244
|
childToken = token;
|
|
237
245
|
childFlow.defineSkip(token.start);
|
|
238
246
|
childFlow.write(stream);
|
|
@@ -315,12 +323,12 @@ function initializeDocument(effects) {
|
|
|
315
323
|
};
|
|
316
324
|
index++;
|
|
317
325
|
}
|
|
318
|
-
|
|
326
|
+
const editMap = new EditMap();
|
|
319
327
|
// Inject the exits earlier (they’re still also at the end).
|
|
320
|
-
|
|
321
|
-
|
|
328
|
+
editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
322
329
|
// Discard the duplicate exits.
|
|
323
|
-
|
|
330
|
+
editMap.add(indexBeforeExits, index - indexBeforeExits, []);
|
|
331
|
+
editMap.consume(self.events);
|
|
324
332
|
}
|
|
325
333
|
}
|
|
326
334
|
|
|
@@ -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"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* } from 'micromark-util-types'
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
import { EditMap } from 'micromark-util-edit-map';
|
|
12
13
|
export const resolver = {
|
|
13
14
|
resolveAll: createResolver()
|
|
14
15
|
};
|
|
@@ -142,6 +143,7 @@ function createResolver(extraResolver) {
|
|
|
142
143
|
* @type {Resolver}
|
|
143
144
|
*/
|
|
144
145
|
function resolveAllLineSuffixes(events, context) {
|
|
146
|
+
const editMap = new EditMap();
|
|
145
147
|
let eventIndex = 0; // Skip first.
|
|
146
148
|
|
|
147
149
|
while (++eventIndex <= events.length) {
|
|
@@ -161,7 +163,9 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
161
163
|
size++;
|
|
162
164
|
bufferIndex--;
|
|
163
165
|
}
|
|
164
|
-
if (bufferIndex)
|
|
166
|
+
if (bufferIndex) {
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
165
169
|
bufferIndex = -1;
|
|
166
170
|
}
|
|
167
171
|
// Number
|
|
@@ -201,12 +205,12 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
201
205
|
if (data.start.offset === data.end.offset) {
|
|
202
206
|
Object.assign(data, token);
|
|
203
207
|
} else {
|
|
204
|
-
|
|
205
|
-
eventIndex += 2;
|
|
208
|
+
editMap.add(eventIndex, 0, [['enter', token, context], ['exit', token, context]]);
|
|
206
209
|
}
|
|
207
210
|
}
|
|
208
211
|
eventIndex++;
|
|
209
212
|
}
|
|
210
213
|
}
|
|
214
|
+
editMap.consume(events);
|
|
211
215
|
return events;
|
|
212
216
|
}
|
|
@@ -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"}
|