@tickernelz/paperclip-pro-server 2026.926.1 → 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 +134 -5
- package/dist/routes/agents.js.map +1 -1
- package/dist/routes/issues.d.ts.map +1 -1
- package/dist/routes/issues.js +86 -6
- package/dist/routes/issues.js.map +1 -1
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +50 -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/adapter-config-field-value.d.ts +12 -0
- package/dist/services/adapter-config-field-value.d.ts.map +1 -0
- package/dist/services/adapter-config-field-value.js +31 -0
- package/dist/services/adapter-config-field-value.js.map +1 -0
- package/dist/services/agent-adapter-config-batch.d.ts +26 -0
- package/dist/services/agent-adapter-config-batch.d.ts.map +1 -0
- package/dist/services/agent-adapter-config-batch.js +174 -0
- package/dist/services/agent-adapter-config-batch.js.map +1 -0
- package/dist/services/heartbeat.d.ts +4 -4
- package/dist/services/issue-model-override-inheritance.d.ts +13 -0
- package/dist/services/issue-model-override-inheritance.d.ts.map +1 -0
- package/dist/services/issue-model-override-inheritance.js +68 -0
- package/dist/services/issue-model-override-inheritance.js.map +1 -0
- package/dist/services/issue-run-model-override.d.ts +19 -4
- package/dist/services/issue-run-model-override.d.ts.map +1 -1
- package/dist/services/issue-run-model-override.js +71 -22
- package/dist/services/issue-run-model-override.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 +36 -1
- package/dist/services/issues.js.map +1 -1
- package/dist/services/native-runtime/native-session-executor.d.ts +1 -1
- package/dist/services/native-runtime/native-session-executor.d.ts.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/{AgentAvatar-CWNp7Eqe.js → AgentAvatar-CnpBTXF0.js} +1 -1
- package/ui-dist/assets/{AgentIdentity-Bqzrcghn.js → AgentIdentity-CV55DQtR.js} +1 -1
- package/ui-dist/assets/{Agents.production-Cs7mMvAL.js → Agents.production-BGeWxNtU.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-4bljbHSU.js → CompanyActivity.production-9gzPo_M_.js} +1 -1
- package/ui-dist/assets/{CompanyExport-CBh7R3lQ.js → CompanyExport-CwCAJj2l.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-DEleeGzs.js → CompanySkills.production-CiTG4koz.js} +1 -1
- package/ui-dist/assets/{Costs.production-Dm5j2nxX.js → Costs.production-CFn4Pjkh.js} +1 -1
- package/ui-dist/assets/{EmptyState-D62UDLDa.js → EmptyState-DeVTy8IU.js} +1 -1
- package/ui-dist/assets/{MarkdownBody-DfGkmx3G.js → MarkdownBody-Da7yUIDf.js} +1 -1
- package/ui-dist/assets/{MarkdownEditor-ZwstkvWb.js → MarkdownEditor-7JCtdEaZ.js} +1 -1
- package/ui-dist/assets/{OrgChart.production-BWKofGdO.js → OrgChart.production-U1cB4YS_.js} +1 -1
- package/ui-dist/assets/{PageSkeleton-C0pPO_Gb.js → PageSkeleton-DRRnaWWU.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-_auZa0K9.js → RoutineDetail.production-oI3mHlKM.js} +1 -1
- package/ui-dist/assets/RoutineRunVariablesDialog-Bj-Q_Ua3.js +5 -0
- package/ui-dist/assets/{Routines.production-D8R6Ujt6.js → Routines.production-sl1FiAYd.js} +1 -1
- package/ui-dist/assets/{SidebarContext-B3vvFvTk.js → SidebarContext-CxjppFTY.js} +1 -1
- package/ui-dist/assets/{StatusIcon-BYqGFWup.js → StatusIcon-j05cEqDO.js} +1 -1
- package/ui-dist/assets/agents-ZcIBncVi.js +1 -0
- package/ui-dist/assets/{badge-CW7lQ_Zd.js → badge-B4sBXDQo.js} +1 -1
- package/ui-dist/assets/{bot-DIsSOxfs.js → bot-CcFVz40n.js} +1 -1
- package/ui-dist/assets/{button-BYQHEF4e.js → button-LkWt40cm.js} +1 -1
- package/ui-dist/assets/{card-CFXZOYds.js → card-DbvoJZ3K.js} +1 -1
- package/ui-dist/assets/{check-Cniv3It0.js → check-CgfxcCMv.js} +1 -1
- package/ui-dist/assets/{checkbox-MLVUJCCS.js → checkbox-CLAkJpms.js} +1 -1
- package/ui-dist/assets/{chevron-down-Dq0fsCvv.js → chevron-down-CpKmud_n.js} +1 -1
- package/ui-dist/assets/{chevron-right-C4o2Lqna.js → chevron-right-IZydUoW5.js} +1 -1
- package/ui-dist/assets/{clipboard-CfEDu5my.js → clipboard-CjMs5cp9.js} +1 -1
- package/ui-dist/assets/{company-members-tdITTHFY.js → company-members-Dyq_pnza.js} +1 -1
- package/ui-dist/assets/createLucideIcon-CZEG6UJ7.js +92 -0
- package/ui-dist/assets/{definition-B5Yyiufk.js → definition-DrGsWdJY.js} +1 -1
- package/ui-dist/assets/{dist-DCpDFPbp.js → dist-Cqh7BG-j.js} +1 -1
- package/ui-dist/assets/{dist-bQQ2HFhw.js → dist-pDmgIRxg.js} +1 -1
- package/ui-dist/assets/{environments-awDXeIDD.js → environments-xbdxVBLT.js} +1 -1
- package/ui-dist/assets/{external-link-3uv6Ak2X.js → external-link-BbeUY6zf.js} +1 -1
- package/ui-dist/assets/{file-text-DWMD8a2i.js → file-text-BMJQ4LZs.js} +1 -1
- package/ui-dist/assets/{health-DY_y3c9e.js → health-Bj6kLXe5.js} +1 -1
- package/ui-dist/assets/{heartbeats-BQipXQOf.js → heartbeats-DFiFf4Zf.js} +1 -1
- package/ui-dist/assets/index-GCNIGBzC.css +1 -0
- package/ui-dist/assets/{index-N4w1Oco1.js → index-cwemnRTq.js} +162 -162
- package/ui-dist/assets/{input-B7ODc-rR.js → input-a7SggR2b.js} +1 -1
- package/ui-dist/assets/label-Dnc69R1W.js +5 -0
- package/ui-dist/assets/{loader-circle-DA6xS_rG.js → loader-circle-Cu72DKdC.js} +1 -1
- package/ui-dist/assets/{mention-chips-r4UB4Eiw.js → mention-chips-BEaOTvHT.js} +1 -1
- package/ui-dist/assets/{octagon-alert-DsI0y-RL.js → octagon-alert-DfqJ6RjK.js} +1 -1
- package/ui-dist/assets/{rotate-ccw-D6pz3VoJ.js → rotate-ccw-DiFaj3XM.js} +1 -1
- package/ui-dist/assets/{router-DcMYq5w_.js → router-G1KztA90.js} +1 -1
- package/ui-dist/assets/{save-CvrYa2yq.js → save-D9PtvKKu.js} +1 -1
- package/ui-dist/assets/{select-CV7s_3g2.js → select-DSr2hsz2.js} +1 -1
- package/ui-dist/assets/{sheet-CrBXG9pk.js → sheet-H27vJn3G.js} +1 -1
- package/ui-dist/assets/{skeleton-efW_R0t3.js → skeleton-CPVPMT4g.js} +1 -1
- package/ui-dist/assets/{tabs-4RdauNv3.js → tabs-D8G3-AL7.js} +1 -1
- package/ui-dist/assets/{triangle-alert-DQUol3t5.js → triangle-alert-DiD4Atur.js} +1 -1
- package/ui-dist/assets/{use-adapter-capabilities-pFfW1mOk.js → use-adapter-capabilities-D_QCYxa2.js} +1 -1
- package/ui-dist/assets/{useHiddenSettings-b1eurTXV.js → useHiddenSettings-vbDpbX0U.js} +1 -1
- package/ui-dist/assets/{zap-CKzX0hdL.js → zap-CCqZhqc3.js} +1 -1
- package/ui-dist/index.html +46 -46
- package/ui-dist/sw.js +1 -1
- package/ui-dist/assets/RoutineRunVariablesDialog-CUcwhS7L.js +0 -5
- package/ui-dist/assets/agents-CNina7HI.js +0 -1
- package/ui-dist/assets/createLucideIcon-CINAT48M.js +0 -92
- package/ui-dist/assets/index-BAoNTaz4.css +0 -1
- package/ui-dist/assets/label-BnqmTeef.js +0 -5
|
@@ -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"}
|
|
@@ -33,20 +33,11 @@ export function preprocess() {
|
|
|
33
33
|
/** @type {Preprocessor} */
|
|
34
34
|
// eslint-disable-next-line complexity
|
|
35
35
|
function preprocessor(value, encoding, end) {
|
|
36
|
+
value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));
|
|
37
|
+
|
|
36
38
|
/** @type {Array<Chunk>} */
|
|
37
39
|
const chunks = [];
|
|
38
|
-
|
|
39
|
-
let match;
|
|
40
|
-
/** @type {number} */
|
|
41
|
-
let next;
|
|
42
|
-
/** @type {number} */
|
|
43
|
-
let startPosition;
|
|
44
|
-
/** @type {number} */
|
|
45
|
-
let endPosition;
|
|
46
|
-
/** @type {Code} */
|
|
47
|
-
let code;
|
|
48
|
-
value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));
|
|
49
|
-
startPosition = 0;
|
|
40
|
+
let startPosition = 0;
|
|
50
41
|
buffer = '';
|
|
51
42
|
if (start) {
|
|
52
43
|
// To do: `markdown-rs` actually parses BOMs (byte order mark).
|
|
@@ -57,9 +48,9 @@ export function preprocess() {
|
|
|
57
48
|
}
|
|
58
49
|
while (startPosition < value.length) {
|
|
59
50
|
search.lastIndex = startPosition;
|
|
60
|
-
match = search.exec(value);
|
|
61
|
-
endPosition = match && match.index !== undefined ? match.index : value.length;
|
|
62
|
-
code = value.charCodeAt(endPosition);
|
|
51
|
+
const match = search.exec(value);
|
|
52
|
+
const endPosition = match && match.index !== undefined ? match.index : value.length;
|
|
53
|
+
const code = value.charCodeAt(endPosition);
|
|
63
54
|
if (!match) {
|
|
64
55
|
buffer = value.slice(startPosition);
|
|
65
56
|
break;
|
|
@@ -85,9 +76,11 @@ export function preprocess() {
|
|
|
85
76
|
}
|
|
86
77
|
case 9:
|
|
87
78
|
{
|
|
88
|
-
next = Math.ceil(column / 4) * 4;
|
|
79
|
+
const next = Math.ceil(column / 4) * 4;
|
|
89
80
|
chunks.push(-2);
|
|
90
|
-
while (column++ < next)
|
|
81
|
+
while (column++ < next) {
|
|
82
|
+
chunks.push(-1);
|
|
83
|
+
}
|
|
91
84
|
break;
|
|
92
85
|
}
|
|
93
86
|
case 10:
|
|
@@ -106,8 +99,12 @@ export function preprocess() {
|
|
|
106
99
|
startPosition = endPosition + 1;
|
|
107
100
|
}
|
|
108
101
|
if (end) {
|
|
109
|
-
if (atCarriageReturn)
|
|
110
|
-
|
|
102
|
+
if (atCarriageReturn) {
|
|
103
|
+
chunks.push(-5);
|
|
104
|
+
}
|
|
105
|
+
if (buffer) {
|
|
106
|
+
chunks.push(buffer);
|
|
107
|
+
}
|
|
111
108
|
chunks.push(null);
|
|
112
109
|
}
|
|
113
110
|
return chunks;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "micromark",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "small commonmark compliant markdown parser with positional info and concrete tokens",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"micromark-util-chunked": "^2.0.0",
|
|
73
73
|
"micromark-util-combine-extensions": "^2.0.0",
|
|
74
74
|
"micromark-util-decode-numeric-character-reference": "^2.0.0",
|
|
75
|
+
"micromark-util-edit-map": "^1.0.0",
|
|
75
76
|
"micromark-util-encode": "^2.0.0",
|
|
76
77
|
"micromark-util-normalize-identifier": "^2.0.0",
|
|
77
78
|
"micromark-util-resolve-all": "^2.0.0",
|
|
@@ -82,19 +83,5 @@
|
|
|
82
83
|
},
|
|
83
84
|
"scripts": {
|
|
84
85
|
"build": "micromark-build"
|
|
85
|
-
},
|
|
86
|
-
"xo": {
|
|
87
|
-
"envs": [
|
|
88
|
-
"shared-node-browser"
|
|
89
|
-
],
|
|
90
|
-
"prettier": true,
|
|
91
|
-
"rules": {
|
|
92
|
-
"logical-assignment-operators": "off",
|
|
93
|
-
"max-depth": "off",
|
|
94
|
-
"unicorn/no-this-assignment": "off",
|
|
95
|
-
"unicorn/prefer-at": "off",
|
|
96
|
-
"unicorn/prefer-code-point": "off",
|
|
97
|
-
"unicorn/prefer-event-target": "off"
|
|
98
|
-
}
|
|
99
86
|
}
|
|
100
87
|
}
|
|
@@ -33,22 +33,8 @@ export const attention = {
|
|
|
33
33
|
// eslint-disable-next-line complexity
|
|
34
34
|
function resolveAllAttention(events, context) {
|
|
35
35
|
let index = -1
|
|
36
|
-
/** @type {number} */
|
|
37
|
-
let open
|
|
38
|
-
/** @type {Token} */
|
|
39
|
-
let group
|
|
40
|
-
/** @type {Token} */
|
|
41
|
-
let text
|
|
42
|
-
/** @type {Token} */
|
|
43
|
-
let openingSequence
|
|
44
|
-
/** @type {Token} */
|
|
45
|
-
let closingSequence
|
|
46
|
-
/** @type {number} */
|
|
47
|
-
let use
|
|
48
36
|
/** @type {Array<Event>} */
|
|
49
37
|
let nextEvents
|
|
50
|
-
/** @type {number} */
|
|
51
|
-
let offset
|
|
52
38
|
|
|
53
39
|
// Walk through all events.
|
|
54
40
|
//
|
|
@@ -61,7 +47,7 @@ function resolveAllAttention(events, context) {
|
|
|
61
47
|
events[index][1].type === 'attentionSequence' &&
|
|
62
48
|
events[index][1]._close
|
|
63
49
|
) {
|
|
64
|
-
open = index
|
|
50
|
+
let open = index
|
|
65
51
|
|
|
66
52
|
// Now walk back to find an opener.
|
|
67
53
|
while (open--) {
|
|
@@ -93,7 +79,7 @@ function resolveAllAttention(events, context) {
|
|
|
93
79
|
}
|
|
94
80
|
|
|
95
81
|
// Number of markers to use from the sequence.
|
|
96
|
-
use =
|
|
82
|
+
const use =
|
|
97
83
|
events[open][1].end.offset - events[open][1].start.offset > 1 &&
|
|
98
84
|
events[index][1].end.offset - events[index][1].start.offset > 1
|
|
99
85
|
? 2
|
|
@@ -104,22 +90,22 @@ function resolveAllAttention(events, context) {
|
|
|
104
90
|
movePoint(start, -use)
|
|
105
91
|
movePoint(end, use)
|
|
106
92
|
|
|
107
|
-
openingSequence = {
|
|
93
|
+
const openingSequence = {
|
|
108
94
|
type: use > 1 ? types.strongSequence : types.emphasisSequence,
|
|
109
95
|
start,
|
|
110
96
|
end: {...events[open][1].end}
|
|
111
97
|
}
|
|
112
|
-
closingSequence = {
|
|
98
|
+
const closingSequence = {
|
|
113
99
|
type: use > 1 ? types.strongSequence : types.emphasisSequence,
|
|
114
100
|
start: {...events[index][1].start},
|
|
115
101
|
end
|
|
116
102
|
}
|
|
117
|
-
text = {
|
|
103
|
+
const text = {
|
|
118
104
|
type: use > 1 ? types.strongText : types.emphasisText,
|
|
119
105
|
start: {...events[open][1].end},
|
|
120
106
|
end: {...events[index][1].start}
|
|
121
107
|
}
|
|
122
|
-
group = {
|
|
108
|
+
const group = {
|
|
123
109
|
type: use > 1 ? types.strong : types.emphasis,
|
|
124
110
|
start: {...openingSequence.start},
|
|
125
111
|
end: {...closingSequence.end}
|
|
@@ -170,6 +156,9 @@ function resolveAllAttention(events, context) {
|
|
|
170
156
|
['exit', group, context]
|
|
171
157
|
])
|
|
172
158
|
|
|
159
|
+
/** @type {number} */
|
|
160
|
+
let offset = 0
|
|
161
|
+
|
|
173
162
|
// If there are more markers in the closing, add them after.
|
|
174
163
|
if (events[index][1].end.offset - events[index][1].start.offset) {
|
|
175
164
|
offset = 2
|
|
@@ -177,8 +166,6 @@ function resolveAllAttention(events, context) {
|
|
|
177
166
|
['enter', events[index][1], context],
|
|
178
167
|
['exit', events[index][1], context]
|
|
179
168
|
])
|
|
180
|
-
} else {
|
|
181
|
-
offset = 0
|
|
182
169
|
}
|
|
183
170
|
|
|
184
171
|
splice(events, open - 1, index - open + 3, nextEvents)
|
|
@@ -261,14 +248,21 @@ function tokenizeAttention(effects, ok) {
|
|
|
261
248
|
// Always populated by defaults.
|
|
262
249
|
assert(attentionMarkers, 'expected `attentionMarkers` to be populated')
|
|
263
250
|
|
|
251
|
+
// Note: `*` and `_` are in `attentionMarkers` through core.
|
|
252
|
+
// They are excluded here as the loosening is meant for markers registered
|
|
253
|
+
// by *other* constructs (such as GFM strikethrough’s `~`).
|
|
264
254
|
const open =
|
|
265
255
|
!after ||
|
|
266
256
|
(after === constants.characterGroupPunctuation && before) ||
|
|
267
|
-
attentionMarkers.includes(code)
|
|
257
|
+
(attentionMarkers.includes(code) &&
|
|
258
|
+
code !== codes.asterisk &&
|
|
259
|
+
code !== codes.underscore)
|
|
268
260
|
const close =
|
|
269
261
|
!before ||
|
|
270
262
|
(before === constants.characterGroupPunctuation && after) ||
|
|
271
|
-
attentionMarkers.includes(previous)
|
|
263
|
+
(attentionMarkers.includes(previous) &&
|
|
264
|
+
previous !== codes.asterisk &&
|
|
265
|
+
previous !== codes.underscore)
|
|
272
266
|
|
|
273
267
|
token._open = Boolean(
|
|
274
268
|
marker === codes.asterisk ? open : open && (before || !close)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-fenced.d.ts","sourceRoot":"","sources":["code-fenced.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code-fenced.d.ts","sourceRoot":"","sources":["code-fenced.js"],"names":[],"mappings":"AAgBA,wBAAwB;AACxB,yBADW,SAAS,CAKnB;+BAdS,sBAAsB"}
|
|
@@ -12,12 +12,7 @@ import {ok as assert} from 'devlop'
|
|
|
12
12
|
import {factorySpace} from 'micromark-factory-space'
|
|
13
13
|
import {markdownLineEnding, markdownSpace} from 'micromark-util-character'
|
|
14
14
|
import {codes, constants, types} from 'micromark-util-symbol'
|
|
15
|
-
|
|
16
|
-
/** @type {Construct} */
|
|
17
|
-
const nonLazyContinuation = {
|
|
18
|
-
partial: true,
|
|
19
|
-
tokenize: tokenizeNonLazyContinuation
|
|
20
|
-
}
|
|
15
|
+
import {nonLazyContinuation} from './partial-non-lazy-continuation.js'
|
|
21
16
|
|
|
22
17
|
/** @type {Construct} */
|
|
23
18
|
export const codeFenced = {
|
|
@@ -475,40 +470,3 @@ function tokenizeCodeFenced(effects, ok, nok) {
|
|
|
475
470
|
}
|
|
476
471
|
}
|
|
477
472
|
}
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* @this {TokenizeContext}
|
|
481
|
-
* Context.
|
|
482
|
-
* @type {Tokenizer}
|
|
483
|
-
*/
|
|
484
|
-
function tokenizeNonLazyContinuation(effects, ok, nok) {
|
|
485
|
-
const self = this
|
|
486
|
-
|
|
487
|
-
return start
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
* @type {State}
|
|
493
|
-
*/
|
|
494
|
-
function start(code) {
|
|
495
|
-
if (code === codes.eof) {
|
|
496
|
-
return nok(code)
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
assert(markdownLineEnding(code), 'expected eol')
|
|
500
|
-
effects.enter(types.lineEnding)
|
|
501
|
-
effects.consume(code)
|
|
502
|
-
effects.exit(types.lineEnding)
|
|
503
|
-
return lineStart
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
* @type {State}
|
|
510
|
-
*/
|
|
511
|
-
function lineStart(code) {
|
|
512
|
-
return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
|
|
513
|
-
}
|
|
514
|
-
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import {ok as assert} from 'devlop'
|
|
11
|
-
import {
|
|
11
|
+
import {factorySpaceMinMax} from 'micromark-factory-space'
|
|
12
12
|
import {markdownLineEnding, markdownSpace} from 'micromark-util-character'
|
|
13
13
|
import {codes, constants, types} from 'micromark-util-symbol'
|
|
14
14
|
|
|
@@ -27,7 +27,6 @@ const furtherStart = {partial: true, tokenize: tokenizeFurtherStart}
|
|
|
27
27
|
* @type {Tokenizer}
|
|
28
28
|
*/
|
|
29
29
|
function tokenizeCodeIndented(effects, ok, nok) {
|
|
30
|
-
const self = this
|
|
31
30
|
return start
|
|
32
31
|
|
|
33
32
|
/**
|
|
@@ -48,35 +47,16 @@ function tokenizeCodeIndented(effects, ok, nok) {
|
|
|
48
47
|
// To do: manually check if interrupting like `markdown-rs`.
|
|
49
48
|
assert(markdownSpace(code))
|
|
50
49
|
effects.enter(types.codeIndented)
|
|
51
|
-
|
|
52
|
-
// so that we can drop the next state.
|
|
53
|
-
return factorySpace(
|
|
50
|
+
return factorySpaceMinMax(
|
|
54
51
|
effects,
|
|
55
|
-
|
|
52
|
+
atBreak,
|
|
53
|
+
nok,
|
|
56
54
|
types.linePrefix,
|
|
57
|
-
constants.tabSize
|
|
55
|
+
constants.tabSize,
|
|
56
|
+
constants.tabSize
|
|
58
57
|
)(code)
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
/**
|
|
62
|
-
* At start, after 1 or 4 spaces.
|
|
63
|
-
*
|
|
64
|
-
* ```markdown
|
|
65
|
-
* > | aaa
|
|
66
|
-
* ^
|
|
67
|
-
* ```
|
|
68
|
-
*
|
|
69
|
-
* @type {State}
|
|
70
|
-
*/
|
|
71
|
-
function afterPrefix(code) {
|
|
72
|
-
const tail = self.events[self.events.length - 1]
|
|
73
|
-
return tail &&
|
|
74
|
-
tail[1].type === types.linePrefix &&
|
|
75
|
-
tail[2].sliceSerialize(tail[1], true).length >= constants.tabSize
|
|
76
|
-
? atBreak(code)
|
|
77
|
-
: nok(code)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
60
|
/**
|
|
81
61
|
* At a break.
|
|
82
62
|
*
|
|
@@ -168,35 +148,31 @@ function tokenizeFurtherStart(effects, ok, nok) {
|
|
|
168
148
|
// To do: the code here in `micromark-js` is a bit different from
|
|
169
149
|
// `markdown-rs` because there it can attempt spaces.
|
|
170
150
|
// We can’t yet.
|
|
171
|
-
|
|
172
|
-
// To do: use an improved `space_or_tab` function like `markdown-rs`,
|
|
173
|
-
// so that we can drop the next state.
|
|
174
|
-
return factorySpace(
|
|
151
|
+
return factorySpaceMinMax(
|
|
175
152
|
effects,
|
|
176
|
-
|
|
153
|
+
ok,
|
|
154
|
+
onNotEnoughPrefix,
|
|
177
155
|
types.linePrefix,
|
|
178
|
-
constants.tabSize
|
|
156
|
+
constants.tabSize,
|
|
157
|
+
constants.tabSize
|
|
179
158
|
)(code)
|
|
180
159
|
}
|
|
181
160
|
|
|
182
161
|
/**
|
|
183
|
-
*
|
|
162
|
+
* After not enough of a prefix.
|
|
163
|
+
*
|
|
164
|
+
* A following line ending is another (potentially blank) line to try,
|
|
165
|
+
* anything else means this isn’t a continuation.
|
|
184
166
|
*
|
|
185
167
|
* ```markdown
|
|
186
168
|
* > | aaa
|
|
187
|
-
*
|
|
169
|
+
*
|
|
170
|
+
* | bbb
|
|
188
171
|
* ```
|
|
189
172
|
*
|
|
190
173
|
* @type {State}
|
|
191
174
|
*/
|
|
192
|
-
function
|
|
193
|
-
|
|
194
|
-
return tail &&
|
|
195
|
-
tail[1].type === types.linePrefix &&
|
|
196
|
-
tail[2].sliceSerialize(tail[1], true).length >= constants.tabSize
|
|
197
|
-
? ok(code)
|
|
198
|
-
: markdownLineEnding(code)
|
|
199
|
-
? furtherStart(code)
|
|
200
|
-
: nok(code)
|
|
175
|
+
function onNotEnoughPrefix(code) {
|
|
176
|
+
return markdownLineEnding(code) ? furtherStart(code) : nok(code)
|
|
201
177
|
}
|
|
202
178
|
}
|
|
@@ -30,10 +30,6 @@ export const headingAtx = {
|
|
|
30
30
|
function resolveHeadingAtx(events, context) {
|
|
31
31
|
let contentEnd = events.length - 2
|
|
32
32
|
let contentStart = 3
|
|
33
|
-
/** @type {Token} */
|
|
34
|
-
let content
|
|
35
|
-
/** @type {Token} */
|
|
36
|
-
let text
|
|
37
33
|
|
|
38
34
|
// Prefix whitespace, part of the opening.
|
|
39
35
|
if (events[contentStart][1].type === types.whitespace) {
|
|
@@ -58,12 +54,12 @@ function resolveHeadingAtx(events, context) {
|
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
if (contentEnd > contentStart) {
|
|
61
|
-
content = {
|
|
57
|
+
const content = {
|
|
62
58
|
type: types.atxHeadingText,
|
|
63
59
|
start: events[contentStart][1].start,
|
|
64
60
|
end: events[contentEnd][1].end
|
|
65
61
|
}
|
|
66
|
-
text = {
|
|
62
|
+
const text = {
|
|
67
63
|
type: types.chunkText,
|
|
68
64
|
start: events[contentStart][1].start,
|
|
69
65
|
end: events[contentEnd][1].end,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-flow.d.ts","sourceRoot":"","sources":["html-flow.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"html-flow.d.ts","sourceRoot":"","sources":["html-flow.js"],"names":[],"mappings":"AAwBA,wBAAwB;AACxB,uBADW,SAAS,CAMnB;+BAtBS,sBAAsB"}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
import {htmlBlockNames, htmlRawNames} from 'micromark-util-html-tag-name'
|
|
21
21
|
import {codes, constants, types} from 'micromark-util-symbol'
|
|
22
22
|
import {blankLine} from './blank-line.js'
|
|
23
|
+
import {nonLazyContinuation} from './partial-non-lazy-continuation.js'
|
|
23
24
|
|
|
24
25
|
/** @type {Construct} */
|
|
25
26
|
export const htmlFlow = {
|
|
@@ -31,10 +32,6 @@ export const htmlFlow = {
|
|
|
31
32
|
|
|
32
33
|
/** @type {Construct} */
|
|
33
34
|
const blankLineBefore = {partial: true, tokenize: tokenizeBlankLineBefore}
|
|
34
|
-
const nonLazyContinuationStart = {
|
|
35
|
-
partial: true,
|
|
36
|
-
tokenize: tokenizeNonLazyContinuationStart
|
|
37
|
-
}
|
|
38
35
|
|
|
39
36
|
/** @type {Resolver} */
|
|
40
37
|
function resolveToHtmlFlow(events) {
|
|
@@ -704,7 +701,7 @@ function tokenizeHtmlFlow(effects, ok, nok) {
|
|
|
704
701
|
*/
|
|
705
702
|
function continuationStart(code) {
|
|
706
703
|
return effects.check(
|
|
707
|
-
|
|
704
|
+
nonLazyContinuation,
|
|
708
705
|
continuationStartNonLazy,
|
|
709
706
|
continuationAfter
|
|
710
707
|
)(code)
|
|
@@ -912,54 +909,6 @@ function tokenizeHtmlFlow(effects, ok, nok) {
|
|
|
912
909
|
}
|
|
913
910
|
}
|
|
914
911
|
|
|
915
|
-
/**
|
|
916
|
-
* @this {TokenizeContext}
|
|
917
|
-
* Context.
|
|
918
|
-
* @type {Tokenizer}
|
|
919
|
-
*/
|
|
920
|
-
function tokenizeNonLazyContinuationStart(effects, ok, nok) {
|
|
921
|
-
const self = this
|
|
922
|
-
|
|
923
|
-
return start
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* At eol, before continuation.
|
|
927
|
-
*
|
|
928
|
-
* ```markdown
|
|
929
|
-
* > | * ```js
|
|
930
|
-
* ^
|
|
931
|
-
* | b
|
|
932
|
-
* ```
|
|
933
|
-
*
|
|
934
|
-
* @type {State}
|
|
935
|
-
*/
|
|
936
|
-
function start(code) {
|
|
937
|
-
if (markdownLineEnding(code)) {
|
|
938
|
-
effects.enter(types.lineEnding)
|
|
939
|
-
effects.consume(code)
|
|
940
|
-
effects.exit(types.lineEnding)
|
|
941
|
-
return after
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
return nok(code)
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* A continuation.
|
|
949
|
-
*
|
|
950
|
-
* ```markdown
|
|
951
|
-
* | * ```js
|
|
952
|
-
* > | b
|
|
953
|
-
* ^
|
|
954
|
-
* ```
|
|
955
|
-
*
|
|
956
|
-
* @type {State}
|
|
957
|
-
*/
|
|
958
|
-
function after(code) {
|
|
959
|
-
return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
|
|
963
912
|
/**
|
|
964
913
|
* @this {TokenizeContext}
|
|
965
914
|
* Context.
|
|
@@ -69,8 +69,6 @@ function resolveAllLabelEnd(events) {
|
|
|
69
69
|
function resolveToLabelEnd(events, context) {
|
|
70
70
|
let index = events.length
|
|
71
71
|
let offset = 0
|
|
72
|
-
/** @type {Token} */
|
|
73
|
-
let token
|
|
74
72
|
/** @type {number | undefined} */
|
|
75
73
|
let open
|
|
76
74
|
/** @type {number | undefined} */
|
|
@@ -80,7 +78,7 @@ function resolveToLabelEnd(events, context) {
|
|
|
80
78
|
|
|
81
79
|
// Find an opening.
|
|
82
80
|
while (index--) {
|
|
83
|
-
token = events[index][1]
|
|
81
|
+
const token = events[index][1]
|
|
84
82
|
|
|
85
83
|
if (open) {
|
|
86
84
|
// If we see another link, or inactive link label, we’ve been here before.
|
|
@@ -187,22 +185,23 @@ function resolveToLabelEnd(events, context) {
|
|
|
187
185
|
*/
|
|
188
186
|
function tokenizeLabelEnd(effects, ok, nok) {
|
|
189
187
|
const self = this
|
|
190
|
-
|
|
188
|
+
const labelStarts = self._labelStarts
|
|
191
189
|
/** @type {Token} */
|
|
192
190
|
let labelStart
|
|
193
191
|
/** @type {boolean} */
|
|
194
192
|
let defined
|
|
195
193
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
194
|
+
if (labelStarts) {
|
|
195
|
+
// Discard ones that failed to close,
|
|
196
|
+
// they’re not needed anymore.
|
|
197
|
+
while (
|
|
198
|
+
labelStarts.length > 0 &&
|
|
199
|
+
labelStarts[labelStarts.length - 1]._balanced
|
|
202
200
|
) {
|
|
203
|
-
|
|
204
|
-
break
|
|
201
|
+
labelStarts.pop()
|
|
205
202
|
}
|
|
203
|
+
|
|
204
|
+
labelStart = labelStarts[labelStarts.length - 1]
|
|
206
205
|
}
|
|
207
206
|
|
|
208
207
|
return start
|
|
@@ -338,6 +337,9 @@ function tokenizeLabelEnd(effects, ok, nok) {
|
|
|
338
337
|
*/
|
|
339
338
|
function labelEndOk(code) {
|
|
340
339
|
// Note: `markdown-rs` does a bunch of stuff here.
|
|
340
|
+
// This label start is now used up: discard it so it’s never found again.
|
|
341
|
+
assert(labelStarts, 'expected `labelStarts` to be populated')
|
|
342
|
+
labelStarts.pop()
|
|
341
343
|
return ok(code)
|
|
342
344
|
}
|
|
343
345
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-start-image.d.ts","sourceRoot":"","sources":["label-start-image.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"label-start-image.d.ts","sourceRoot":"","sources":["label-start-image.js"],"names":[],"mappings":"AAcA,wBAAwB;AACxB,8BADW,SAAS,CAKnB;+BAZS,sBAAsB"}
|