markdown-codec 11.1.12 → 11.1.14
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/block/block.cjs +23 -612
- package/dist/block/block.d.cts +22 -3
- package/dist/block/block.d.ts +22 -3
- package/dist/block/block.js +2 -607
- package/dist/block/definitions.d.cts +1 -1
- package/dist/block/definitions.d.ts +1 -1
- package/dist/block/list.d.cts +1 -1
- package/dist/block/list.d.ts +1 -1
- package/dist/block/node.d.cts +1 -45
- package/dist/block/node.d.ts +1 -45
- package/dist/block/parser.cjs +3 -0
- package/dist/block/parser.d.cts +57 -0
- package/dist/block/parser.d.ts +57 -0
- package/dist/block/parser.js +2 -0
- package/dist/block-C3ftt8qO.js +610 -0
- package/dist/block-DsxTiUms.cjs +747 -0
- package/dist/defaults/defaults.d.cts +1 -1
- package/dist/defaults/defaults.d.ts +1 -1
- package/dist/emit/emit.cjs +7 -647
- package/dist/emit/emit.d.cts +22 -3
- package/dist/emit/emit.d.ts +22 -3
- package/dist/emit/emit.js +2 -646
- package/dist/emit/html-table.d.cts +1 -1
- package/dist/emit/html-table.d.ts +1 -1
- package/dist/emit/inline.cjs +1 -1
- package/dist/emit/inline.js +1 -1
- package/dist/emit/list-render.cjs +29 -0
- package/dist/emit/list-render.d.cts +81 -0
- package/dist/emit/list-render.d.ts +81 -0
- package/dist/emit/list-render.js +2 -0
- package/dist/emit/setext.cjs +143 -0
- package/dist/emit/setext.d.cts +30 -0
- package/dist/emit/setext.d.ts +30 -0
- package/dist/emit/setext.js +119 -0
- package/dist/emit/table.d.cts +1 -11
- package/dist/emit/table.d.ts +1 -11
- package/dist/emit-CCOoudJW.cjs +734 -0
- package/dist/emit-Do1KMQHB.js +537 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/inline/entity.cjs +1 -1
- package/dist/inline/entity.js +1 -1
- package/dist/inline/inline.cjs +2 -2
- package/dist/inline/inline.d.cts +1 -1
- package/dist/inline/inline.d.ts +1 -1
- package/dist/inline/inline.js +2 -2
- package/dist/{inline-CArcArOD.d.ts → inline-BG6ge5m2.d.ts} +1 -1
- package/dist/{inline-GzD5QtFh.d.cts → inline-BxX0iOy6.d.cts} +1 -1
- package/dist/lower/lower.cjs +3 -3
- package/dist/lower/lower.d.cts +1 -1
- package/dist/lower/lower.d.ts +1 -1
- package/dist/lower/lower.js +2 -2
- package/dist/node-DcxnTjF0.d.cts +46 -0
- package/dist/node-w8dVfAUD.d.ts +46 -0
- package/dist/options/options.d.cts +1 -43
- package/dist/options/options.d.ts +1 -43
- package/dist/options-CZoMEGL8.d.ts +44 -0
- package/dist/options-ZnZOMG3X.d.cts +44 -0
- package/dist/read.d.cts +1 -1
- package/dist/read.d.ts +1 -1
- package/dist/scan/entity-table-n-z.cjs +207 -0
- package/dist/scan/entity-table-n-z.d.cts +4 -0
- package/dist/scan/entity-table-n-z.d.ts +4 -0
- package/dist/scan/entity-table-n-z.js +206 -0
- package/dist/scan/entity-table-t-z.cjs +28 -0
- package/dist/scan/entity-table-t-z.d.cts +4 -0
- package/dist/scan/entity-table-t-z.d.ts +4 -0
- package/dist/scan/entity-table-t-z.js +27 -0
- package/dist/scan/entity-table-u-z.cjs +59 -0
- package/dist/scan/entity-table-u-z.d.cts +4 -0
- package/dist/scan/entity-table-u-z.d.ts +4 -0
- package/dist/scan/entity-table-u-z.js +58 -0
- package/dist/scan/entity-table-w-z.cjs +11 -0
- package/dist/scan/entity-table-w-z.d.cts +4 -0
- package/dist/scan/entity-table-w-z.d.ts +4 -0
- package/dist/scan/entity-table-w-z.js +10 -0
- package/dist/scan/entity-table-x-z.cjs +10 -0
- package/dist/scan/entity-table-x-z.d.cts +4 -0
- package/dist/scan/entity-table-x-z.d.ts +4 -0
- package/dist/scan/entity-table-x-z.js +9 -0
- package/dist/scan/entity-table-y-z-2.cjs +780 -0
- package/dist/scan/entity-table-y-z-2.d.cts +4 -0
- package/dist/scan/entity-table-y-z-2.d.ts +4 -0
- package/dist/scan/entity-table-y-z-2.js +779 -0
- package/dist/scan/entity-table-y-z.cjs +779 -0
- package/dist/scan/entity-table-y-z.d.cts +4 -0
- package/dist/scan/entity-table-y-z.d.ts +4 -0
- package/dist/scan/entity-table-y-z.js +778 -0
- package/dist/scan/entity-table.cjs +20 -1834
- package/dist/scan/entity-table.d.cts +2 -1
- package/dist/scan/entity-table.d.ts +2 -1
- package/dist/scan/entity-table.js +20 -1835
- package/dist/table-BFbOhm0R.d.ts +12 -0
- package/dist/table-PtkYEYdL.d.cts +12 -0
- package/dist/write.cjs +2 -2
- package/dist/write.d.cts +1 -1
- package/dist/write.d.ts +1 -1
- package/dist/write.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,734 @@
|
|
|
1
|
+
const require_diagnostics_diagnostics = require("./diagnostics/diagnostics.cjs");
|
|
2
|
+
const require_inline_footnote = require("./inline/footnote.cjs");
|
|
3
|
+
const require_shared_line_ending = require("./shared/line-ending.cjs");
|
|
4
|
+
require("./defaults/defaults.cjs");
|
|
5
|
+
const require_shared_style_constants = require("./shared/style-constants.cjs");
|
|
6
|
+
const require_shared_list_id = require("./shared/list-id.cjs");
|
|
7
|
+
const require_emit_front_matter = require("./emit/front-matter.cjs");
|
|
8
|
+
const require_emit_inline = require("./emit/inline.cjs");
|
|
9
|
+
const require_emit_image = require("./emit/image.cjs");
|
|
10
|
+
const require_emit_table = require("./emit/table.cjs");
|
|
11
|
+
const require_emit_setext = require("./emit/setext.cjs");
|
|
12
|
+
let document_schema_js = require("document-schema.js");
|
|
13
|
+
//#region src/emit/list-render.ts
|
|
14
|
+
function listInfoFor(numId, context) {
|
|
15
|
+
if (numId === void 0) {
|
|
16
|
+
if (!context.reportedAbsentNumIdFallback) {
|
|
17
|
+
context.reportedAbsentNumIdFallback = true;
|
|
18
|
+
context.sink({
|
|
19
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.LIST_NUMID_FALLBACK,
|
|
20
|
+
severity: "info",
|
|
21
|
+
message: "a list membership with no numId of its own (a depth-only ContentListMembership) has no marker type, task-ness, or loose-ness to recover and falls back to an ordinary, tight, non-task bullet list"
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const info = require_shared_list_id.parseListNumId(numId);
|
|
27
|
+
if (info === void 0 && !context.reportedFallbackNumIds.has(numId)) {
|
|
28
|
+
context.reportedFallbackNumIds.add(numId);
|
|
29
|
+
context.sink({
|
|
30
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.LIST_NUMID_FALLBACK,
|
|
31
|
+
severity: "info",
|
|
32
|
+
message: `numId "${numId}" was not minted by this package's own src/lower and falls back to an ordinary, tight, non-task bullet list`
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return info;
|
|
36
|
+
}
|
|
37
|
+
function stripCheckboxRun(item) {
|
|
38
|
+
const first = item.runs[0];
|
|
39
|
+
const glyphPrefix = first?.text.startsWith(`☒ `) === true ? `☒ ` : `☐ `;
|
|
40
|
+
if (first?.text.startsWith(glyphPrefix) !== true) return item;
|
|
41
|
+
const strippedText = first.text.slice(glyphPrefix.length);
|
|
42
|
+
const runs = strippedText.length === 0 ? item.runs.slice(1) : [{
|
|
43
|
+
...first,
|
|
44
|
+
text: strippedText
|
|
45
|
+
}, ...item.runs.slice(1)];
|
|
46
|
+
return {
|
|
47
|
+
...item,
|
|
48
|
+
runs
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function toEmitItem(item) {
|
|
52
|
+
return item.kind === "paragraph" ? { block: item.block } : item.item;
|
|
53
|
+
}
|
|
54
|
+
function firstBlockCheckbox(first, taskNumId) {
|
|
55
|
+
if (first.list.checked !== void 0) return {
|
|
56
|
+
checkboxText: first.list.checked ? "[x] " : "[ ] ",
|
|
57
|
+
strippedFirstBlock: void 0
|
|
58
|
+
};
|
|
59
|
+
if (!taskNumId || first.kind !== "paragraph") return {
|
|
60
|
+
checkboxText: "",
|
|
61
|
+
strippedFirstBlock: void 0
|
|
62
|
+
};
|
|
63
|
+
const leading = first.block.runs[0]?.text;
|
|
64
|
+
if (leading?.startsWith(`☒ `) === true) return {
|
|
65
|
+
checkboxText: "[x] ",
|
|
66
|
+
strippedFirstBlock: stripCheckboxRun(first.block)
|
|
67
|
+
};
|
|
68
|
+
if (leading?.startsWith(`☐ `) === true) return {
|
|
69
|
+
checkboxText: "[ ] ",
|
|
70
|
+
strippedFirstBlock: stripCheckboxRun(first.block)
|
|
71
|
+
};
|
|
72
|
+
return {
|
|
73
|
+
checkboxText: "",
|
|
74
|
+
strippedFirstBlock: void 0
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function renderListItemMarker(numId, info, glyph, checkboxText, context) {
|
|
78
|
+
if (info?.type === "ordered" && numId !== void 0) {
|
|
79
|
+
const next = context.orderedCounters.get(numId) ?? info.start ?? 1;
|
|
80
|
+
context.orderedCounters.set(numId, next + 1);
|
|
81
|
+
const bare = `${String(next)}${glyph} `;
|
|
82
|
+
return {
|
|
83
|
+
full: `${bare}${checkboxText}`,
|
|
84
|
+
bareLength: bare.length
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
const bare = `${glyph} `;
|
|
88
|
+
return {
|
|
89
|
+
full: `${bare}${checkboxText}`,
|
|
90
|
+
bareLength: bare.length
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const BULLET_GLYPH_CANDIDATES = [
|
|
94
|
+
"-",
|
|
95
|
+
"+",
|
|
96
|
+
"*"
|
|
97
|
+
];
|
|
98
|
+
const ORDERED_GLYPH_CANDIDATES = [".", ")"];
|
|
99
|
+
function resolveListGlyph(numId, type, previousSibling, context) {
|
|
100
|
+
const cached = context.resolvedListGlyphs.get(numId);
|
|
101
|
+
if (cached !== void 0) return cached;
|
|
102
|
+
const defaultGlyph = type === "ordered" ? context.orderedDelimiter : context.bulletMarker;
|
|
103
|
+
const glyph = previousSibling?.type === type && previousSibling.glyph === defaultGlyph ? (type === "ordered" ? ORDERED_GLYPH_CANDIDATES : BULLET_GLYPH_CANDIDATES).find((candidate) => candidate !== defaultGlyph) ?? defaultGlyph : defaultGlyph;
|
|
104
|
+
context.resolvedListGlyphs.set(numId, glyph);
|
|
105
|
+
return glyph;
|
|
106
|
+
}
|
|
107
|
+
function consumeSameItemRun(items, from, level, itemId) {
|
|
108
|
+
let end = from;
|
|
109
|
+
for (;;) {
|
|
110
|
+
const candidate = items[end];
|
|
111
|
+
if (candidate?.list.level !== level || candidate.list.itemId !== itemId) break;
|
|
112
|
+
end += 1;
|
|
113
|
+
}
|
|
114
|
+
return end;
|
|
115
|
+
}
|
|
116
|
+
function collectListItem(items, start, level, itemId) {
|
|
117
|
+
const segments = [];
|
|
118
|
+
let index = start;
|
|
119
|
+
const ownEnd = itemId === void 0 ? index + 1 : consumeSameItemRun(items, index, level, itemId);
|
|
120
|
+
segments.push({
|
|
121
|
+
kind: "own",
|
|
122
|
+
blocks: items.slice(index, ownEnd)
|
|
123
|
+
});
|
|
124
|
+
index = ownEnd;
|
|
125
|
+
for (;;) {
|
|
126
|
+
let nestedEnd = index;
|
|
127
|
+
for (;;) {
|
|
128
|
+
const candidateLevel = items[nestedEnd]?.list.level;
|
|
129
|
+
if (candidateLevel === void 0 || candidateLevel <= level) break;
|
|
130
|
+
nestedEnd += 1;
|
|
131
|
+
}
|
|
132
|
+
if (nestedEnd === index) break;
|
|
133
|
+
segments.push({
|
|
134
|
+
kind: "nested",
|
|
135
|
+
blocks: items.slice(index, nestedEnd)
|
|
136
|
+
});
|
|
137
|
+
index = nestedEnd;
|
|
138
|
+
if (itemId === void 0) break;
|
|
139
|
+
const resumedEnd = consumeSameItemRun(items, index, level, itemId);
|
|
140
|
+
segments.push({
|
|
141
|
+
kind: "own",
|
|
142
|
+
blocks: items.slice(index, resumedEnd)
|
|
143
|
+
});
|
|
144
|
+
index = resumedEnd;
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
segments,
|
|
148
|
+
next: index
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function emitItemCanInterrupt(item, context) {
|
|
152
|
+
if (!isConstructItem(item)) return item.block.kind === "paragraph" ? canInterruptOpenParagraph(item.block, context) : true;
|
|
153
|
+
if (isMaterialisedDivision(item)) return true;
|
|
154
|
+
const first = item.children[0];
|
|
155
|
+
return first === void 0 ? true : emitItemCanInterrupt(first, context);
|
|
156
|
+
}
|
|
157
|
+
function lastStyleIdOf(item) {
|
|
158
|
+
if (isConstructItem(item)) {
|
|
159
|
+
const last = item.children[item.children.length - 1];
|
|
160
|
+
return last === void 0 ? void 0 : lastStyleIdOf(last);
|
|
161
|
+
}
|
|
162
|
+
return item.block.kind === "paragraph" ? item.block.styleId : void 0;
|
|
163
|
+
}
|
|
164
|
+
function regionItemCanInterrupt(item, context) {
|
|
165
|
+
return emitItemCanInterrupt(toEmitItem(item), context);
|
|
166
|
+
}
|
|
167
|
+
function lastStyleIdOfRegionItem(item) {
|
|
168
|
+
return lastStyleIdOf(toEmitItem(item));
|
|
169
|
+
}
|
|
170
|
+
function listRegionItemBody(item, context, overrideParagraph) {
|
|
171
|
+
if (item.kind === "paragraph") return renderParagraphBody(overrideParagraph ?? item.block, context);
|
|
172
|
+
const previousEnclosingItemId = context.enclosingItemId;
|
|
173
|
+
context.enclosingItemId = item.list.itemId;
|
|
174
|
+
const body = renderConstruct(item.item, context);
|
|
175
|
+
context.enclosingItemId = previousEnclosingItemId;
|
|
176
|
+
return body;
|
|
177
|
+
}
|
|
178
|
+
function requiresBlankLineBefore(next, previousStyleId, context) {
|
|
179
|
+
if (previousStyleId === "HTMLPreformatted") return true;
|
|
180
|
+
return !require_emit_setext.terminatesCleanly(previousStyleId) && !regionItemCanInterrupt(next, context);
|
|
181
|
+
}
|
|
182
|
+
function renderListRegion(items, context) {
|
|
183
|
+
const parts = [];
|
|
184
|
+
let index = 0;
|
|
185
|
+
let previousSibling;
|
|
186
|
+
for (;;) {
|
|
187
|
+
const item = items[index];
|
|
188
|
+
if (item === void 0) break;
|
|
189
|
+
const { numId, level, itemId } = item.list;
|
|
190
|
+
const info = listInfoFor(numId, context);
|
|
191
|
+
const loose = info?.loose === true;
|
|
192
|
+
const type = info?.type ?? "bullet";
|
|
193
|
+
const glyph = numId === void 0 ? context.bulletMarker : resolveListGlyph(numId, type, previousSibling, context);
|
|
194
|
+
if (numId !== void 0) previousSibling = {
|
|
195
|
+
numId,
|
|
196
|
+
type,
|
|
197
|
+
glyph
|
|
198
|
+
};
|
|
199
|
+
const { segments, next } = collectListItem(items, index, level, itemId);
|
|
200
|
+
const first = segments[0]?.blocks[0];
|
|
201
|
+
if (first === void 0) break;
|
|
202
|
+
const { checkboxText, strippedFirstBlock } = firstBlockCheckbox(first, info?.task === true);
|
|
203
|
+
const marker = renderListItemMarker(numId, info, glyph, checkboxText, context);
|
|
204
|
+
const indent = " ".repeat(marker.bareLength);
|
|
205
|
+
let text = marker.full;
|
|
206
|
+
let renderedFirstLine = false;
|
|
207
|
+
let previousStyleId;
|
|
208
|
+
for (const segment of segments) {
|
|
209
|
+
if (segment.kind === "nested") {
|
|
210
|
+
const nested = renderListRegion(segment.blocks, context).split("\n").map((line) => line.length === 0 ? line : `${indent}${line}`).join("\n");
|
|
211
|
+
text += `\n${nested}`;
|
|
212
|
+
const lastNested = segment.blocks[segment.blocks.length - 1];
|
|
213
|
+
previousStyleId = lastNested === void 0 ? void 0 : lastStyleIdOfRegionItem(lastNested);
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
for (const block of segment.blocks) {
|
|
217
|
+
if (!renderedFirstLine) {
|
|
218
|
+
const [firstLine, ...restLines] = require_emit_setext.splitLines(listRegionItemBody(block, context, strippedFirstBlock), "\n");
|
|
219
|
+
text += [firstLine, ...restLines.map((line) => `${indent}${line}`)].join("\n");
|
|
220
|
+
renderedFirstLine = true;
|
|
221
|
+
previousStyleId = lastStyleIdOfRegionItem(block);
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
const rendered = listRegionItemBody(block, context, void 0).split("\n").map((line) => line.length === 0 ? line : `${indent}${line}`).join("\n");
|
|
225
|
+
const blank = loose || requiresBlankLineBefore(block, previousStyleId, context);
|
|
226
|
+
text += blank ? `\n\n${rendered}` : `\n${rendered}`;
|
|
227
|
+
previousStyleId = lastStyleIdOfRegionItem(block);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
parts.push({
|
|
231
|
+
numId,
|
|
232
|
+
text
|
|
233
|
+
});
|
|
234
|
+
index = next;
|
|
235
|
+
}
|
|
236
|
+
let out = "";
|
|
237
|
+
for (const [partIndex, part] of parts.entries()) {
|
|
238
|
+
if (partIndex > 0) {
|
|
239
|
+
const previous = parts[partIndex - 1];
|
|
240
|
+
const continuesTightly = previous.numId === part.numId && (previous.numId === void 0 || require_shared_list_id.parseListNumId(previous.numId)?.loose !== true);
|
|
241
|
+
out += continuesTightly ? "\n" : "\n\n";
|
|
242
|
+
}
|
|
243
|
+
out += part.text;
|
|
244
|
+
}
|
|
245
|
+
return out;
|
|
246
|
+
}
|
|
247
|
+
function isConstructItem(item) {
|
|
248
|
+
return "descriptor" in item;
|
|
249
|
+
}
|
|
250
|
+
const UNINDENTED_PT = 0;
|
|
251
|
+
function isMaterialisedDivision(item) {
|
|
252
|
+
return item.descriptor.kind === "division" && item.children.every((child) => {
|
|
253
|
+
if (isConstructItem(child)) return true;
|
|
254
|
+
return child.block.kind !== "paragraph" || (child.block.indentLeftPt ?? 0) >= 36;
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
function groupConstructItems(blocks, start) {
|
|
258
|
+
const items = [];
|
|
259
|
+
let index = start;
|
|
260
|
+
for (;;) {
|
|
261
|
+
const block = blocks[index];
|
|
262
|
+
if (block === void 0) break;
|
|
263
|
+
index += 1;
|
|
264
|
+
if (block.kind === "constructEnd") return {
|
|
265
|
+
items,
|
|
266
|
+
next: index
|
|
267
|
+
};
|
|
268
|
+
if (block.kind === "constructStart") {
|
|
269
|
+
const nested = groupConstructItems(blocks, index);
|
|
270
|
+
items.push({
|
|
271
|
+
descriptor: block.descriptor,
|
|
272
|
+
children: nested.items
|
|
273
|
+
});
|
|
274
|
+
index = nested.next;
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
items.push({ block });
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
items,
|
|
281
|
+
next: index
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
const FOOTNOTE_CONTINUATION_INDENT = 4;
|
|
285
|
+
function renderFootnoteDefinition(name, body) {
|
|
286
|
+
const marker = `[^${name}]:`;
|
|
287
|
+
if (body.length === 0) return marker;
|
|
288
|
+
const indent = " ".repeat(4);
|
|
289
|
+
const [firstLine, ...restLines] = require_emit_setext.splitLines(body, "\n");
|
|
290
|
+
return [`${marker} ${firstLine}`, ...restLines.map((line) => line.length === 0 ? line : `${indent}${line}`)].join("\n");
|
|
291
|
+
}
|
|
292
|
+
function renderConstruct(item, context) {
|
|
293
|
+
const { descriptor } = item;
|
|
294
|
+
if (descriptor.kind === "anchor" && descriptor.anchorType === "footnote") {
|
|
295
|
+
const body = renderItems(item.children, context);
|
|
296
|
+
if (require_inline_footnote.isValidFootnoteLabel(descriptor.name)) return renderFootnoteDefinition(descriptor.name, body);
|
|
297
|
+
context.sink({
|
|
298
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.CONSTRUCT_UNREPRESENTED,
|
|
299
|
+
severity: "info",
|
|
300
|
+
message: `a footnote anchor's own name "${descriptor.name}" cannot be spelled as a "[^label]:" marker (whitespace or "]" would reparse as something else); its own extent still renders in place, but the construct itself is not represented`
|
|
301
|
+
});
|
|
302
|
+
return body;
|
|
303
|
+
}
|
|
304
|
+
if (isMaterialisedDivision(item)) {
|
|
305
|
+
context.divisionDepth += 1;
|
|
306
|
+
const body = renderItems(item.children, context);
|
|
307
|
+
context.divisionDepth -= 1;
|
|
308
|
+
return body.split("\n").map((line) => line.length === 0 ? ">" : `> ${line}`).join("\n");
|
|
309
|
+
}
|
|
310
|
+
if (descriptor.kind === "link" && descriptor.target.kind === "external") {
|
|
311
|
+
const onlyChild = item.children.length === 1 && !isConstructItem(item.children[0]) ? item.children[0].block : void 0;
|
|
312
|
+
if (onlyChild?.kind === "image" && !isDataUri(descriptor.target.uri)) return `}${descriptor.title === void 0 ? "" : ` "${require_emit_inline.renderLinkTitle(descriptor.title)}"`})`;
|
|
313
|
+
if (onlyChild?.kind === "image" && isDataUri(descriptor.target.uri) && !context.embedImages) return require_emit_image.emitImage(onlyChild, false);
|
|
314
|
+
}
|
|
315
|
+
const body = renderItems(item.children, context);
|
|
316
|
+
const detail = descriptor.kind === "anchor" ? `${descriptor.kind} (${descriptor.anchorType})` : descriptor.kind;
|
|
317
|
+
context.sink({
|
|
318
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.CONSTRUCT_UNREPRESENTED,
|
|
319
|
+
severity: "info",
|
|
320
|
+
message: `a "${detail}" construct has no markdown syntax; its own extent still renders in place, but the construct itself is not represented`
|
|
321
|
+
});
|
|
322
|
+
return body;
|
|
323
|
+
}
|
|
324
|
+
function constructCarriesListItemId(item, itemId) {
|
|
325
|
+
return item.children.some((child) => {
|
|
326
|
+
if (isConstructItem(child)) return constructCarriesListItemId(child, itemId);
|
|
327
|
+
if (child.block.kind !== "paragraph") return false;
|
|
328
|
+
const list = child.block.list;
|
|
329
|
+
if (list?.itemId === itemId) return true;
|
|
330
|
+
return list?.numId !== void 0 && require_shared_list_id.parseListNumId(list.numId)?.ownerItemId === itemId;
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
function isInheritedListMembership(list, context) {
|
|
334
|
+
return list.itemId !== void 0 && list.itemId === context.enclosingItemId;
|
|
335
|
+
}
|
|
336
|
+
function renderItems(items, context) {
|
|
337
|
+
const parts = [];
|
|
338
|
+
let index = 0;
|
|
339
|
+
for (;;) {
|
|
340
|
+
const item = items[index];
|
|
341
|
+
if (item === void 0) break;
|
|
342
|
+
if (isConstructItem(item)) {
|
|
343
|
+
const rendered = renderConstruct(item, context);
|
|
344
|
+
if (rendered.length > 0) parts.push(rendered);
|
|
345
|
+
index += 1;
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
if (item.block.kind === "paragraph" && item.block.list !== void 0 && !isInheritedListMembership(item.block.list, context)) {
|
|
349
|
+
const region = [];
|
|
350
|
+
let end = index;
|
|
351
|
+
const openMemberships = [];
|
|
352
|
+
for (;;) {
|
|
353
|
+
const candidate = items[end];
|
|
354
|
+
if (candidate === void 0) break;
|
|
355
|
+
if (isConstructItem(candidate)) {
|
|
356
|
+
let matched;
|
|
357
|
+
for (let i = openMemberships.length - 1; i >= 0; i -= 1) {
|
|
358
|
+
const membership = openMemberships[i];
|
|
359
|
+
if (membership.itemId !== void 0 && constructCarriesListItemId(candidate, membership.itemId)) {
|
|
360
|
+
matched = membership;
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
if (matched === void 0) break;
|
|
365
|
+
region.push({
|
|
366
|
+
kind: "construct",
|
|
367
|
+
item: candidate,
|
|
368
|
+
list: matched
|
|
369
|
+
});
|
|
370
|
+
end += 1;
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
if (candidate.block.kind !== "paragraph" || candidate.block.list === void 0 || isInheritedListMembership(candidate.block.list, context)) break;
|
|
374
|
+
const list = candidate.block.list;
|
|
375
|
+
while (openMemberships.length > 0 && openMemberships[openMemberships.length - 1].level >= list.level) openMemberships.pop();
|
|
376
|
+
openMemberships.push(list);
|
|
377
|
+
region.push({
|
|
378
|
+
kind: "paragraph",
|
|
379
|
+
block: candidate.block,
|
|
380
|
+
list
|
|
381
|
+
});
|
|
382
|
+
end += 1;
|
|
383
|
+
}
|
|
384
|
+
parts.push(renderListRegion(region, context));
|
|
385
|
+
index = end;
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
const rendered = renderTopLevelBlock(item.block, context);
|
|
389
|
+
if (rendered.length > 0) parts.push(rendered);
|
|
390
|
+
index += 1;
|
|
391
|
+
}
|
|
392
|
+
return parts.join("\n\n");
|
|
393
|
+
}
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region src/emit/emit.ts
|
|
396
|
+
function isDataUri(destination) {
|
|
397
|
+
return destination.startsWith("data:");
|
|
398
|
+
}
|
|
399
|
+
function canInterruptOpenParagraph(paragraph, context) {
|
|
400
|
+
const styleId = paragraph.styleId;
|
|
401
|
+
if (styleId === void 0) return false;
|
|
402
|
+
if (styleId === "CodeBlock" || styleId === "MathBlock") return true;
|
|
403
|
+
if (styleId === "HorizontalRule") return context.thematicBreakChar !== "-";
|
|
404
|
+
const headingLevel = require_shared_style_constants.parseHeadingStyleId(styleId);
|
|
405
|
+
if (headingLevel !== void 0) return !require_emit_setext.willRenderAsSetext(paragraph, (0, document_schema_js.clampHeadingLevel)(headingLevel), context);
|
|
406
|
+
return false;
|
|
407
|
+
}
|
|
408
|
+
function quoteDepthOf(paragraph) {
|
|
409
|
+
if (paragraph.indentLeftPt === void 0 || paragraph.indentLeftPt <= 0) return 0;
|
|
410
|
+
return Math.max(1, Math.round(paragraph.indentLeftPt / 36));
|
|
411
|
+
}
|
|
412
|
+
function renderParagraphBody(paragraph, context) {
|
|
413
|
+
if (paragraph.styleId === "HorizontalRule") return context.thematicBreakChar.repeat(3);
|
|
414
|
+
if (paragraph.styleId === "CodeBlock") {
|
|
415
|
+
const literal = paragraph.runs.map((run) => run.text).join("");
|
|
416
|
+
const fence = require_emit_setext.codeFenceFor(literal, context.codeFenceChar);
|
|
417
|
+
const remainder = paragraph.source?.format === "markdown" ? paragraph.source.xml : void 0;
|
|
418
|
+
const info = [paragraph.codeLanguage, remainder].filter((part) => part !== void 0 && part.length > 0).join(" ");
|
|
419
|
+
const opening = info.length > 0 ? `${fence} ${info}` : fence;
|
|
420
|
+
return literal.length === 0 ? `${opening}\n${fence}` : `${opening}\n${literal}\n${fence}`;
|
|
421
|
+
}
|
|
422
|
+
if (paragraph.styleId === "HTMLPreformatted") return paragraph.source?.format === "markdown" ? paragraph.source.xml : paragraph.runs.map((run) => run.text).join("");
|
|
423
|
+
if (paragraph.styleId === "MathBlock") return `$$\n${paragraph.runs.map((run) => run.text).join("")}\n$$`;
|
|
424
|
+
const headingLevel = paragraph.styleId === void 0 ? void 0 : require_shared_style_constants.parseHeadingStyleId(paragraph.styleId);
|
|
425
|
+
if (headingLevel !== void 0) {
|
|
426
|
+
const level = (0, document_schema_js.clampHeadingLevel)(headingLevel);
|
|
427
|
+
if (level !== headingLevel) context.sink({
|
|
428
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.HEADING_LEVEL_CLAMPED,
|
|
429
|
+
severity: "info",
|
|
430
|
+
message: `heading level ${String(headingLevel)} exceeds ATX's own six-"#" ceiling and is clamped to ${String(level)}`
|
|
431
|
+
});
|
|
432
|
+
const text = require_emit_inline.emitRuns(paragraph.runs, context, paragraph.constructs);
|
|
433
|
+
const embedsLineBreak = require_shared_line_ending.LINE_ENDING_PATTERN.test(text);
|
|
434
|
+
const unsafeSetextReason = require_emit_setext.unsafeSetextBreakReason(text);
|
|
435
|
+
const unsafeForSetext = unsafeSetextReason !== void 0;
|
|
436
|
+
const setextRequested = context.headingStyle === "setext" || embedsLineBreak;
|
|
437
|
+
if (setextRequested && level <= 2 && !unsafeForSetext) {
|
|
438
|
+
if (context.headingStyle !== "setext") {
|
|
439
|
+
const leadingBreakAbsorbed = require_emit_setext.firstContentLineIndex(text) > 0;
|
|
440
|
+
context.sink({
|
|
441
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.HEADING_STYLE_OVERRIDDEN_FOR_LINE_BREAK,
|
|
442
|
+
severity: "info",
|
|
443
|
+
message: leadingBreakAbsorbed ? `the effective WriteMarkdownOptions.headingStyle is 'atx' (its own default, or an explicit caller choice), but this level ${String(level)} heading's own content contains a line break ATX has no way to hold — rendered as setext instead, though the heading's own leading blank line is absorbed as ordinary space ahead of it on read-back rather than reproduced inside it` : `the effective WriteMarkdownOptions.headingStyle is 'atx' (its own default, or an explicit caller choice), but this level ${String(level)} heading's own content contains a line break ATX has no way to hold — rendered as setext instead so the break survives`
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
return require_emit_setext.renderSetextHeading(level, text);
|
|
447
|
+
}
|
|
448
|
+
if (setextRequested && level <= 2 && unsafeForSetext) {
|
|
449
|
+
context.sink({
|
|
450
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.HEADING_LINE_BREAK_UNSAFE_FOR_SETEXT,
|
|
451
|
+
severity: "info",
|
|
452
|
+
message: require_emit_setext.unsafeSetextDiagnosticMessage(level, unsafeSetextReason, embedsLineBreak)
|
|
453
|
+
});
|
|
454
|
+
return require_emit_setext.renderAtxHeading(level, text);
|
|
455
|
+
}
|
|
456
|
+
if (embedsLineBreak) context.sink({
|
|
457
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.HEADING_LINE_BREAK_COLLAPSED,
|
|
458
|
+
severity: "info",
|
|
459
|
+
message: `a level ${String(level)} heading's own content contains a line break; only setext's own level-1/2 grammar can hold one, so ATX collapses it to a single space`
|
|
460
|
+
});
|
|
461
|
+
return require_emit_setext.renderAtxHeading(level, text);
|
|
462
|
+
}
|
|
463
|
+
return require_emit_inline.emitRuns(paragraph.runs, context, paragraph.constructs);
|
|
464
|
+
}
|
|
465
|
+
function renderParagraph(paragraph, context) {
|
|
466
|
+
const body = renderParagraphBody(paragraph, context);
|
|
467
|
+
const depth = context.divisionDepth > 0 ? 0 : quoteDepthOf(paragraph);
|
|
468
|
+
if (depth === 0) return body;
|
|
469
|
+
if (!require_emit_setext.isQuotableStyle(paragraph.styleId)) {
|
|
470
|
+
context.sink({
|
|
471
|
+
code: require_diagnostics_diagnostics.MarkdownDiagnosticCodes.PARAGRAPH_INDENT_DROPPED,
|
|
472
|
+
severity: "info",
|
|
473
|
+
message: `paragraph carries indentLeftPt (${String(paragraph.indentLeftPt)}pt) with no styleId this package recognises as quotable; the indent has no other markdown representation and is dropped`
|
|
474
|
+
});
|
|
475
|
+
return body;
|
|
476
|
+
}
|
|
477
|
+
const prefix = "> ".repeat(depth);
|
|
478
|
+
return body.split("\n").map((line) => `${prefix}${line}`).join("\n");
|
|
479
|
+
}
|
|
480
|
+
function renderTopLevelBlock(block, context) {
|
|
481
|
+
switch (block.kind) {
|
|
482
|
+
case "paragraph": return renderParagraph(block, context);
|
|
483
|
+
case "table": return require_emit_table.emitTable(block, context);
|
|
484
|
+
case "image": return require_emit_image.emitImage(block, context.embedImages);
|
|
485
|
+
case "embeddedObject":
|
|
486
|
+
if (block.objectKind === "formula" && block.document.kind === "formula" && block.document.formula.presentation !== void 0) {
|
|
487
|
+
const latex = block.document.formula.presentation.latex;
|
|
488
|
+
return latex.length === 0 ? "$$\n$$" : `$$\n${latex}\n$$`;
|
|
489
|
+
}
|
|
490
|
+
return "";
|
|
491
|
+
case "pageBreak": return "";
|
|
492
|
+
}
|
|
493
|
+
return assertNeverRenderableBlock(block);
|
|
494
|
+
}
|
|
495
|
+
function emitBlocks(blocks, context) {
|
|
496
|
+
const imbalance = (0, document_schema_js.findConstructMarkerImbalance)(blocks);
|
|
497
|
+
if (imbalance !== void 0) throw new require_diagnostics_diagnostics.MarkdownUnbalancedConstructMarkersError(imbalance.kind, imbalance.index);
|
|
498
|
+
validateRunConstructExtents(blocks);
|
|
499
|
+
return renderItems(groupConstructItems(blocks, 0).items, context);
|
|
500
|
+
}
|
|
501
|
+
function validateRunConstructExtents(blocks) {
|
|
502
|
+
for (const block of blocks) {
|
|
503
|
+
if (block.kind === "paragraph") {
|
|
504
|
+
const fault = (0, document_schema_js.findRunConstructFault)(block);
|
|
505
|
+
if (fault !== void 0) throw new require_diagnostics_diagnostics.MarkdownInvalidRunConstructExtentError(fault.kind, fault.index);
|
|
506
|
+
}
|
|
507
|
+
if (block.kind === "table") for (const row of block.rows) for (const cell of row.cells) validateRunConstructExtents(cell.blocks);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
function emitMarkdown(document, options = {}) {
|
|
511
|
+
if (document.kind !== "wordprocessing") throw new require_diagnostics_diagnostics.MarkdownUnsupportedDocumentKindError(document.kind);
|
|
512
|
+
const context = {
|
|
513
|
+
sink: options.sink ?? require_diagnostics_diagnostics.NOOP_MARKDOWN_DIAGNOSTIC_SINK,
|
|
514
|
+
emphasisMarker: options.emphasisMarker ?? "_",
|
|
515
|
+
bulletMarker: options.bulletListMarker ?? "-",
|
|
516
|
+
orderedDelimiter: options.orderedListDelimiter ?? ".",
|
|
517
|
+
codeFenceChar: options.codeFenceChar ?? "`",
|
|
518
|
+
thematicBreakChar: options.thematicBreakChar ?? "-",
|
|
519
|
+
headingStyle: options.headingStyle ?? "atx",
|
|
520
|
+
embedImages: options.images ?? true,
|
|
521
|
+
orderedCounters: /* @__PURE__ */ new Map(),
|
|
522
|
+
resolvedListGlyphs: /* @__PURE__ */ new Map(),
|
|
523
|
+
reportedFallbackNumIds: /* @__PURE__ */ new Set(),
|
|
524
|
+
reportedAbsentNumIdFallback: false,
|
|
525
|
+
divisionDepth: 0,
|
|
526
|
+
enclosingItemId: void 0
|
|
527
|
+
};
|
|
528
|
+
const body = document.sections.map((section) => emitBlocks(section.blocks, context)).join("\n\n");
|
|
529
|
+
const frontMatter = options.frontMatter === true ? require_emit_front_matter.emitFrontMatter(document.metadata) : void 0;
|
|
530
|
+
const text = frontMatter === void 0 ? body : `${frontMatter}\n\n${body}`;
|
|
531
|
+
return (options.lineEnding ?? "lf") === "crlf" ? text.replaceAll("\n", "\r\n") : text;
|
|
532
|
+
}
|
|
533
|
+
function assertNeverRenderableBlock(block) {
|
|
534
|
+
throw new Error(`markdown-codec: unhandled renderable block ${JSON.stringify(block)}`);
|
|
535
|
+
}
|
|
536
|
+
//#endregion
|
|
537
|
+
Object.defineProperty(exports, "BULLET_GLYPH_CANDIDATES", {
|
|
538
|
+
enumerable: true,
|
|
539
|
+
get: function() {
|
|
540
|
+
return BULLET_GLYPH_CANDIDATES;
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
Object.defineProperty(exports, "FOOTNOTE_CONTINUATION_INDENT", {
|
|
544
|
+
enumerable: true,
|
|
545
|
+
get: function() {
|
|
546
|
+
return FOOTNOTE_CONTINUATION_INDENT;
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
Object.defineProperty(exports, "ORDERED_GLYPH_CANDIDATES", {
|
|
550
|
+
enumerable: true,
|
|
551
|
+
get: function() {
|
|
552
|
+
return ORDERED_GLYPH_CANDIDATES;
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
Object.defineProperty(exports, "UNINDENTED_PT", {
|
|
556
|
+
enumerable: true,
|
|
557
|
+
get: function() {
|
|
558
|
+
return UNINDENTED_PT;
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
Object.defineProperty(exports, "assertNeverRenderableBlock", {
|
|
562
|
+
enumerable: true,
|
|
563
|
+
get: function() {
|
|
564
|
+
return assertNeverRenderableBlock;
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
Object.defineProperty(exports, "canInterruptOpenParagraph", {
|
|
568
|
+
enumerable: true,
|
|
569
|
+
get: function() {
|
|
570
|
+
return canInterruptOpenParagraph;
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
Object.defineProperty(exports, "collectListItem", {
|
|
574
|
+
enumerable: true,
|
|
575
|
+
get: function() {
|
|
576
|
+
return collectListItem;
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
Object.defineProperty(exports, "constructCarriesListItemId", {
|
|
580
|
+
enumerable: true,
|
|
581
|
+
get: function() {
|
|
582
|
+
return constructCarriesListItemId;
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
Object.defineProperty(exports, "consumeSameItemRun", {
|
|
586
|
+
enumerable: true,
|
|
587
|
+
get: function() {
|
|
588
|
+
return consumeSameItemRun;
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
Object.defineProperty(exports, "emitItemCanInterrupt", {
|
|
592
|
+
enumerable: true,
|
|
593
|
+
get: function() {
|
|
594
|
+
return emitItemCanInterrupt;
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
Object.defineProperty(exports, "emitMarkdown", {
|
|
598
|
+
enumerable: true,
|
|
599
|
+
get: function() {
|
|
600
|
+
return emitMarkdown;
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
Object.defineProperty(exports, "firstBlockCheckbox", {
|
|
604
|
+
enumerable: true,
|
|
605
|
+
get: function() {
|
|
606
|
+
return firstBlockCheckbox;
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
Object.defineProperty(exports, "groupConstructItems", {
|
|
610
|
+
enumerable: true,
|
|
611
|
+
get: function() {
|
|
612
|
+
return groupConstructItems;
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
Object.defineProperty(exports, "isConstructItem", {
|
|
616
|
+
enumerable: true,
|
|
617
|
+
get: function() {
|
|
618
|
+
return isConstructItem;
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
Object.defineProperty(exports, "isDataUri", {
|
|
622
|
+
enumerable: true,
|
|
623
|
+
get: function() {
|
|
624
|
+
return isDataUri;
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
Object.defineProperty(exports, "isInheritedListMembership", {
|
|
628
|
+
enumerable: true,
|
|
629
|
+
get: function() {
|
|
630
|
+
return isInheritedListMembership;
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
Object.defineProperty(exports, "isMaterialisedDivision", {
|
|
634
|
+
enumerable: true,
|
|
635
|
+
get: function() {
|
|
636
|
+
return isMaterialisedDivision;
|
|
637
|
+
}
|
|
638
|
+
});
|
|
639
|
+
Object.defineProperty(exports, "lastStyleIdOf", {
|
|
640
|
+
enumerable: true,
|
|
641
|
+
get: function() {
|
|
642
|
+
return lastStyleIdOf;
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
Object.defineProperty(exports, "lastStyleIdOfRegionItem", {
|
|
646
|
+
enumerable: true,
|
|
647
|
+
get: function() {
|
|
648
|
+
return lastStyleIdOfRegionItem;
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
Object.defineProperty(exports, "listInfoFor", {
|
|
652
|
+
enumerable: true,
|
|
653
|
+
get: function() {
|
|
654
|
+
return listInfoFor;
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
Object.defineProperty(exports, "listRegionItemBody", {
|
|
658
|
+
enumerable: true,
|
|
659
|
+
get: function() {
|
|
660
|
+
return listRegionItemBody;
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
Object.defineProperty(exports, "regionItemCanInterrupt", {
|
|
664
|
+
enumerable: true,
|
|
665
|
+
get: function() {
|
|
666
|
+
return regionItemCanInterrupt;
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
Object.defineProperty(exports, "renderConstruct", {
|
|
670
|
+
enumerable: true,
|
|
671
|
+
get: function() {
|
|
672
|
+
return renderConstruct;
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
Object.defineProperty(exports, "renderFootnoteDefinition", {
|
|
676
|
+
enumerable: true,
|
|
677
|
+
get: function() {
|
|
678
|
+
return renderFootnoteDefinition;
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
Object.defineProperty(exports, "renderItems", {
|
|
682
|
+
enumerable: true,
|
|
683
|
+
get: function() {
|
|
684
|
+
return renderItems;
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
Object.defineProperty(exports, "renderListItemMarker", {
|
|
688
|
+
enumerable: true,
|
|
689
|
+
get: function() {
|
|
690
|
+
return renderListItemMarker;
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
Object.defineProperty(exports, "renderListRegion", {
|
|
694
|
+
enumerable: true,
|
|
695
|
+
get: function() {
|
|
696
|
+
return renderListRegion;
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
Object.defineProperty(exports, "renderParagraphBody", {
|
|
700
|
+
enumerable: true,
|
|
701
|
+
get: function() {
|
|
702
|
+
return renderParagraphBody;
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
Object.defineProperty(exports, "renderTopLevelBlock", {
|
|
706
|
+
enumerable: true,
|
|
707
|
+
get: function() {
|
|
708
|
+
return renderTopLevelBlock;
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
Object.defineProperty(exports, "requiresBlankLineBefore", {
|
|
712
|
+
enumerable: true,
|
|
713
|
+
get: function() {
|
|
714
|
+
return requiresBlankLineBefore;
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
Object.defineProperty(exports, "resolveListGlyph", {
|
|
718
|
+
enumerable: true,
|
|
719
|
+
get: function() {
|
|
720
|
+
return resolveListGlyph;
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
Object.defineProperty(exports, "stripCheckboxRun", {
|
|
724
|
+
enumerable: true,
|
|
725
|
+
get: function() {
|
|
726
|
+
return stripCheckboxRun;
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
Object.defineProperty(exports, "toEmitItem", {
|
|
730
|
+
enumerable: true,
|
|
731
|
+
get: function() {
|
|
732
|
+
return toEmitItem;
|
|
733
|
+
}
|
|
734
|
+
});
|