@readme/markdown 13.4.0 → 13.6.0
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/components/Callout/style.scss +8 -0
- package/dist/enums.d.ts +1 -0
- package/dist/lib/ast-processor.d.ts +2 -2
- package/dist/lib/mdast-util/empty-task-list-item/index.d.ts +2 -0
- package/dist/lib/micromark/loose-html-entities/index.d.ts +9 -0
- package/dist/lib/micromark/loose-html-entities/syntax.d.ts +9 -0
- package/dist/main.css +1 -1
- package/dist/main.css.map +1 -1
- package/dist/main.js +848 -180
- package/dist/main.node.js +848 -180
- package/dist/main.node.js.map +1 -1
- package/dist/processor/compile/list-item.d.ts +12 -0
- package/dist/processor/plugin/flatten-table-cell-paragraphs.d.ts +13 -0
- package/dist/processor/transform/mdxish/constants.d.ts +5 -0
- package/dist/processor/transform/mdxish/mdxish-inline-components.d.ts +11 -0
- package/package.json +5 -2
package/dist/main.node.js
CHANGED
|
@@ -48515,21 +48515,8 @@ function syntax_tokenizeIndent(effects, ok, nok) {
|
|
|
48515
48515
|
|
|
48516
48516
|
;// ./node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
|
|
48517
48517
|
/**
|
|
48518
|
-
* @
|
|
48519
|
-
* @
|
|
48520
|
-
* @typedef {import('micromark-util-types').Resolver} Resolver
|
|
48521
|
-
* @typedef {import('micromark-util-types').State} State
|
|
48522
|
-
* @typedef {import('micromark-util-types').Token} Token
|
|
48523
|
-
* @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
|
|
48524
|
-
* @typedef {import('micromark-util-types').Tokenizer} Tokenizer
|
|
48525
|
-
*
|
|
48526
|
-
* @typedef Options
|
|
48527
|
-
* Configuration (optional).
|
|
48528
|
-
* @property {boolean | null | undefined} [singleTilde=true]
|
|
48529
|
-
* Whether to support strikethrough with a single tilde (default: `true`).
|
|
48530
|
-
*
|
|
48531
|
-
* Single tildes work on github.com, but are technically prohibited by the
|
|
48532
|
-
* GFM spec.
|
|
48518
|
+
* @import {Options} from 'micromark-extension-gfm-strikethrough'
|
|
48519
|
+
* @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
|
|
48533
48520
|
*/
|
|
48534
48521
|
|
|
48535
48522
|
|
|
@@ -48545,14 +48532,15 @@ function syntax_tokenizeIndent(effects, ok, nok) {
|
|
|
48545
48532
|
* enable GFM strikethrough syntax.
|
|
48546
48533
|
*/
|
|
48547
48534
|
function gfmStrikethrough(options) {
|
|
48548
|
-
const options_ = options || {}
|
|
48549
|
-
let single = options_.singleTilde
|
|
48535
|
+
const options_ = options || {};
|
|
48536
|
+
let single = options_.singleTilde;
|
|
48550
48537
|
const tokenizer = {
|
|
48538
|
+
name: 'strikethrough',
|
|
48551
48539
|
tokenize: tokenizeStrikethrough,
|
|
48552
48540
|
resolveAll: resolveAllStrikethrough
|
|
48553
|
-
}
|
|
48541
|
+
};
|
|
48554
48542
|
if (single === null || single === undefined) {
|
|
48555
|
-
single = true
|
|
48543
|
+
single = true;
|
|
48556
48544
|
}
|
|
48557
48545
|
return {
|
|
48558
48546
|
text: {
|
|
@@ -48564,7 +48552,7 @@ function gfmStrikethrough(options) {
|
|
|
48564
48552
|
attentionMarkers: {
|
|
48565
48553
|
null: [126]
|
|
48566
48554
|
}
|
|
48567
|
-
}
|
|
48555
|
+
};
|
|
48568
48556
|
|
|
48569
48557
|
/**
|
|
48570
48558
|
* Take events and resolve strikethrough.
|
|
@@ -48572,86 +48560,62 @@ function gfmStrikethrough(options) {
|
|
|
48572
48560
|
* @type {Resolver}
|
|
48573
48561
|
*/
|
|
48574
48562
|
function resolveAllStrikethrough(events, context) {
|
|
48575
|
-
let index = -1
|
|
48563
|
+
let index = -1;
|
|
48576
48564
|
|
|
48577
48565
|
// Walk through all events.
|
|
48578
48566
|
while (++index < events.length) {
|
|
48579
48567
|
// Find a token that can close.
|
|
48580
|
-
if (
|
|
48581
|
-
|
|
48582
|
-
events[index][1].type === 'strikethroughSequenceTemporary' &&
|
|
48583
|
-
events[index][1]._close
|
|
48584
|
-
) {
|
|
48585
|
-
let open = index
|
|
48568
|
+
if (events[index][0] === 'enter' && events[index][1].type === 'strikethroughSequenceTemporary' && events[index][1]._close) {
|
|
48569
|
+
let open = index;
|
|
48586
48570
|
|
|
48587
48571
|
// Now walk back to find an opener.
|
|
48588
48572
|
while (open--) {
|
|
48589
48573
|
// Find a token that can open the closer.
|
|
48590
|
-
if (
|
|
48591
|
-
|
|
48592
|
-
|
|
48593
|
-
events[
|
|
48594
|
-
|
|
48595
|
-
events[index][1].end.offset - events[index][1].start.offset ===
|
|
48596
|
-
events[open][1].end.offset - events[open][1].start.offset
|
|
48597
|
-
) {
|
|
48598
|
-
events[index][1].type = 'strikethroughSequence'
|
|
48599
|
-
events[open][1].type = 'strikethroughSequence'
|
|
48574
|
+
if (events[open][0] === 'exit' && events[open][1].type === 'strikethroughSequenceTemporary' && events[open][1]._open &&
|
|
48575
|
+
// If the sizes are the same:
|
|
48576
|
+
events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {
|
|
48577
|
+
events[index][1].type = 'strikethroughSequence';
|
|
48578
|
+
events[open][1].type = 'strikethroughSequence';
|
|
48600
48579
|
|
|
48601
48580
|
/** @type {Token} */
|
|
48602
48581
|
const strikethrough = {
|
|
48603
48582
|
type: 'strikethrough',
|
|
48604
48583
|
start: Object.assign({}, events[open][1].start),
|
|
48605
48584
|
end: Object.assign({}, events[index][1].end)
|
|
48606
|
-
}
|
|
48585
|
+
};
|
|
48607
48586
|
|
|
48608
48587
|
/** @type {Token} */
|
|
48609
48588
|
const text = {
|
|
48610
48589
|
type: 'strikethroughText',
|
|
48611
48590
|
start: Object.assign({}, events[open][1].end),
|
|
48612
48591
|
end: Object.assign({}, events[index][1].start)
|
|
48613
|
-
}
|
|
48592
|
+
};
|
|
48614
48593
|
|
|
48615
48594
|
// Opening.
|
|
48616
48595
|
/** @type {Array<Event>} */
|
|
48617
|
-
const nextEvents = [
|
|
48618
|
-
|
|
48619
|
-
['enter', events[open][1], context],
|
|
48620
|
-
['exit', events[open][1], context],
|
|
48621
|
-
['enter', text, context]
|
|
48622
|
-
]
|
|
48623
|
-
const insideSpan = context.parser.constructs.insideSpan.null
|
|
48596
|
+
const nextEvents = [['enter', strikethrough, context], ['enter', events[open][1], context], ['exit', events[open][1], context], ['enter', text, context]];
|
|
48597
|
+
const insideSpan = context.parser.constructs.insideSpan.null;
|
|
48624
48598
|
if (insideSpan) {
|
|
48625
48599
|
// Between.
|
|
48626
|
-
splice(
|
|
48627
|
-
nextEvents,
|
|
48628
|
-
nextEvents.length,
|
|
48629
|
-
0,
|
|
48630
|
-
resolveAll(insideSpan, events.slice(open + 1, index), context)
|
|
48631
|
-
)
|
|
48600
|
+
splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context));
|
|
48632
48601
|
}
|
|
48633
48602
|
|
|
48634
48603
|
// Closing.
|
|
48635
|
-
splice(nextEvents, nextEvents.length, 0, [
|
|
48636
|
-
|
|
48637
|
-
|
|
48638
|
-
|
|
48639
|
-
['exit', strikethrough, context]
|
|
48640
|
-
])
|
|
48641
|
-
splice(events, open - 1, index - open + 3, nextEvents)
|
|
48642
|
-
index = open + nextEvents.length - 2
|
|
48643
|
-
break
|
|
48604
|
+
splice(nextEvents, nextEvents.length, 0, [['exit', text, context], ['enter', events[index][1], context], ['exit', events[index][1], context], ['exit', strikethrough, context]]);
|
|
48605
|
+
splice(events, open - 1, index - open + 3, nextEvents);
|
|
48606
|
+
index = open + nextEvents.length - 2;
|
|
48607
|
+
break;
|
|
48644
48608
|
}
|
|
48645
48609
|
}
|
|
48646
48610
|
}
|
|
48647
48611
|
}
|
|
48648
|
-
index = -1
|
|
48612
|
+
index = -1;
|
|
48649
48613
|
while (++index < events.length) {
|
|
48650
48614
|
if (events[index][1].type === 'strikethroughSequenceTemporary') {
|
|
48651
|
-
events[index][1].type =
|
|
48615
|
+
events[index][1].type = "data";
|
|
48652
48616
|
}
|
|
48653
48617
|
}
|
|
48654
|
-
return events
|
|
48618
|
+
return events;
|
|
48655
48619
|
}
|
|
48656
48620
|
|
|
48657
48621
|
/**
|
|
@@ -48659,43 +48623,39 @@ function gfmStrikethrough(options) {
|
|
|
48659
48623
|
* @type {Tokenizer}
|
|
48660
48624
|
*/
|
|
48661
48625
|
function tokenizeStrikethrough(effects, ok, nok) {
|
|
48662
|
-
const previous = this.previous
|
|
48663
|
-
const events = this.events
|
|
48664
|
-
let size = 0
|
|
48665
|
-
return start
|
|
48626
|
+
const previous = this.previous;
|
|
48627
|
+
const events = this.events;
|
|
48628
|
+
let size = 0;
|
|
48629
|
+
return start;
|
|
48666
48630
|
|
|
48667
48631
|
/** @type {State} */
|
|
48668
48632
|
function start(code) {
|
|
48669
|
-
if (
|
|
48670
|
-
|
|
48671
|
-
events[events.length - 1][1].type !== 'characterEscape'
|
|
48672
|
-
) {
|
|
48673
|
-
return nok(code)
|
|
48633
|
+
if (previous === 126 && events[events.length - 1][1].type !== "characterEscape") {
|
|
48634
|
+
return nok(code);
|
|
48674
48635
|
}
|
|
48675
|
-
effects.enter('strikethroughSequenceTemporary')
|
|
48676
|
-
return more(code)
|
|
48636
|
+
effects.enter('strikethroughSequenceTemporary');
|
|
48637
|
+
return more(code);
|
|
48677
48638
|
}
|
|
48678
48639
|
|
|
48679
48640
|
/** @type {State} */
|
|
48680
48641
|
function more(code) {
|
|
48681
|
-
const before = classifyCharacter(previous)
|
|
48642
|
+
const before = classifyCharacter(previous);
|
|
48682
48643
|
if (code === 126) {
|
|
48683
48644
|
// If this is the third marker, exit.
|
|
48684
|
-
if (size > 1) return nok(code)
|
|
48685
|
-
effects.consume(code)
|
|
48686
|
-
size
|
|
48687
|
-
return more
|
|
48688
|
-
}
|
|
48689
|
-
if (size < 2 && !single) return nok(code)
|
|
48690
|
-
const token = effects.exit('strikethroughSequenceTemporary')
|
|
48691
|
-
const after = classifyCharacter(code)
|
|
48692
|
-
token._open = !after ||
|
|
48693
|
-
token._close = !before ||
|
|
48694
|
-
return ok(code)
|
|
48645
|
+
if (size > 1) return nok(code);
|
|
48646
|
+
effects.consume(code);
|
|
48647
|
+
size++;
|
|
48648
|
+
return more;
|
|
48649
|
+
}
|
|
48650
|
+
if (size < 2 && !single) return nok(code);
|
|
48651
|
+
const token = effects.exit('strikethroughSequenceTemporary');
|
|
48652
|
+
const after = classifyCharacter(code);
|
|
48653
|
+
token._open = !after || after === 2 && Boolean(before);
|
|
48654
|
+
token._close = !before || before === 2 && Boolean(after);
|
|
48655
|
+
return ok(code);
|
|
48695
48656
|
}
|
|
48696
48657
|
}
|
|
48697
48658
|
}
|
|
48698
|
-
|
|
48699
48659
|
;// ./node_modules/micromark-extension-gfm-table/lib/edit-map.js
|
|
48700
48660
|
/**
|
|
48701
48661
|
* @typedef {import('micromark-util-types').Event} Event
|
|
@@ -61272,6 +61232,7 @@ function remarkMdx(options) {
|
|
|
61272
61232
|
;// ./enums.ts
|
|
61273
61233
|
var NodeTypes;
|
|
61274
61234
|
(function (NodeTypes) {
|
|
61235
|
+
NodeTypes["anchor"] = "readme-anchor";
|
|
61275
61236
|
NodeTypes["callout"] = "rdme-callout";
|
|
61276
61237
|
NodeTypes["codeTabs"] = "code-tabs";
|
|
61277
61238
|
NodeTypes["embedBlock"] = "embed-block";
|
|
@@ -64231,7 +64192,7 @@ var EntityDecoderState;
|
|
|
64231
64192
|
EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
|
|
64232
64193
|
EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
|
|
64233
64194
|
})(EntityDecoderState || (EntityDecoderState = {}));
|
|
64234
|
-
var
|
|
64195
|
+
var decode_DecodingMode;
|
|
64235
64196
|
(function (DecodingMode) {
|
|
64236
64197
|
/** Entities in text nodes that can end with any character. */
|
|
64237
64198
|
DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
|
|
@@ -64239,7 +64200,7 @@ var DecodingMode;
|
|
|
64239
64200
|
DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
|
|
64240
64201
|
/** Entities in attributes have limitations on ending characters. */
|
|
64241
64202
|
DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
|
|
64242
|
-
})(
|
|
64203
|
+
})(decode_DecodingMode || (decode_DecodingMode = {}));
|
|
64243
64204
|
/**
|
|
64244
64205
|
* Token decoder with support of writing partial entities.
|
|
64245
64206
|
*/
|
|
@@ -64278,7 +64239,7 @@ class EntityDecoder {
|
|
|
64278
64239
|
/** The number of characters that were consumed in excess. */
|
|
64279
64240
|
this.excess = 1;
|
|
64280
64241
|
/** The mode in which the decoder is operating. */
|
|
64281
|
-
this.decodeMode =
|
|
64242
|
+
this.decodeMode = decode_DecodingMode.Strict;
|
|
64282
64243
|
}
|
|
64283
64244
|
/** Resets the instance to make it reusable. */
|
|
64284
64245
|
startEntity(decodeMode) {
|
|
@@ -64427,7 +64388,7 @@ class EntityDecoder {
|
|
|
64427
64388
|
if (lastCp === CharCodes.SEMI) {
|
|
64428
64389
|
this.consumed += 1;
|
|
64429
64390
|
}
|
|
64430
|
-
else if (this.decodeMode ===
|
|
64391
|
+
else if (this.decodeMode === decode_DecodingMode.Strict) {
|
|
64431
64392
|
return 0;
|
|
64432
64393
|
}
|
|
64433
64394
|
this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
|
|
@@ -64459,7 +64420,7 @@ class EntityDecoder {
|
|
|
64459
64420
|
if (this.treeIndex < 0) {
|
|
64460
64421
|
return this.result === 0 ||
|
|
64461
64422
|
// If we are parsing an attribute
|
|
64462
|
-
(this.decodeMode ===
|
|
64423
|
+
(this.decodeMode === decode_DecodingMode.Attribute &&
|
|
64463
64424
|
// We shouldn't have consumed any characters after the entity,
|
|
64464
64425
|
(valueLength === 0 ||
|
|
64465
64426
|
// And there should be no invalid characters.
|
|
@@ -64476,7 +64437,7 @@ class EntityDecoder {
|
|
|
64476
64437
|
return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
|
|
64477
64438
|
}
|
|
64478
64439
|
// If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
|
|
64479
|
-
if (this.decodeMode !==
|
|
64440
|
+
if (this.decodeMode !== decode_DecodingMode.Strict) {
|
|
64480
64441
|
this.result = this.treeIndex;
|
|
64481
64442
|
this.consumed += this.excess;
|
|
64482
64443
|
this.excess = 0;
|
|
@@ -64531,7 +64492,7 @@ class EntityDecoder {
|
|
|
64531
64492
|
case EntityDecoderState.NamedEntity: {
|
|
64532
64493
|
// Emit a named entity if we have one.
|
|
64533
64494
|
return this.result !== 0 &&
|
|
64534
|
-
(this.decodeMode !==
|
|
64495
|
+
(this.decodeMode !== decode_DecodingMode.Attribute ||
|
|
64535
64496
|
this.result === this.treeIndex)
|
|
64536
64497
|
? this.emitNotTerminatedNamedEntity()
|
|
64537
64498
|
: 0;
|
|
@@ -64638,7 +64599,7 @@ const xmlDecoder = getDecoder(decode_data_xml);
|
|
|
64638
64599
|
* @param mode The decoding mode.
|
|
64639
64600
|
* @returns The decoded string.
|
|
64640
64601
|
*/
|
|
64641
|
-
function
|
|
64602
|
+
function decode_decodeHTML(str, mode = decode_DecodingMode.Legacy) {
|
|
64642
64603
|
return htmlDecoder(str, mode);
|
|
64643
64604
|
}
|
|
64644
64605
|
/**
|
|
@@ -64648,7 +64609,7 @@ function decodeHTML(str, mode = DecodingMode.Legacy) {
|
|
|
64648
64609
|
* @returns The decoded string.
|
|
64649
64610
|
*/
|
|
64650
64611
|
function decodeHTMLAttribute(str) {
|
|
64651
|
-
return htmlDecoder(str,
|
|
64612
|
+
return htmlDecoder(str, decode_DecodingMode.Attribute);
|
|
64652
64613
|
}
|
|
64653
64614
|
/**
|
|
64654
64615
|
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
|
|
@@ -64657,7 +64618,7 @@ function decodeHTMLAttribute(str) {
|
|
|
64657
64618
|
* @returns The decoded string.
|
|
64658
64619
|
*/
|
|
64659
64620
|
function decodeHTMLStrict(str) {
|
|
64660
|
-
return htmlDecoder(str,
|
|
64621
|
+
return htmlDecoder(str, decode_DecodingMode.Strict);
|
|
64661
64622
|
}
|
|
64662
64623
|
/**
|
|
64663
64624
|
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
|
|
@@ -64665,8 +64626,8 @@ function decodeHTMLStrict(str) {
|
|
|
64665
64626
|
* @param str The string to decode.
|
|
64666
64627
|
* @returns The decoded string.
|
|
64667
64628
|
*/
|
|
64668
|
-
function
|
|
64669
|
-
return xmlDecoder(str,
|
|
64629
|
+
function decode_decodeXML(str) {
|
|
64630
|
+
return xmlDecoder(str, decode_DecodingMode.Strict);
|
|
64670
64631
|
}
|
|
64671
64632
|
//# sourceMappingURL=decode.js.map
|
|
64672
64633
|
;// ./node_modules/parse5/dist/common/html.js
|
|
@@ -72215,7 +72176,7 @@ function endTagInForeignContent(p, token) {
|
|
|
72215
72176
|
}
|
|
72216
72177
|
//# sourceMappingURL=index.js.map
|
|
72217
72178
|
;// ./node_modules/entities/lib/esm/escape.js
|
|
72218
|
-
const
|
|
72179
|
+
const escape_xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
|
|
72219
72180
|
const xmlCodeMap = new Map([
|
|
72220
72181
|
[34, """],
|
|
72221
72182
|
[38, "&"],
|
|
@@ -72224,7 +72185,7 @@ const xmlCodeMap = new Map([
|
|
|
72224
72185
|
[62, ">"],
|
|
72225
72186
|
]);
|
|
72226
72187
|
// For compatibility with node < 4, we wrap `codePointAt`
|
|
72227
|
-
const
|
|
72188
|
+
const escape_getCodePoint =
|
|
72228
72189
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
72229
72190
|
String.prototype.codePointAt != null
|
|
72230
72191
|
? (str, index) => str.codePointAt(index)
|
|
@@ -72242,11 +72203,11 @@ String.prototype.codePointAt != null
|
|
|
72242
72203
|
* If a character has no equivalent entity, a
|
|
72243
72204
|
* numeric hexadecimal reference (eg. `ü`) will be used.
|
|
72244
72205
|
*/
|
|
72245
|
-
function
|
|
72206
|
+
function escape_encodeXML(str) {
|
|
72246
72207
|
let ret = "";
|
|
72247
72208
|
let lastIdx = 0;
|
|
72248
72209
|
let match;
|
|
72249
|
-
while ((match =
|
|
72210
|
+
while ((match = escape_xmlReplacer.exec(str)) !== null) {
|
|
72250
72211
|
const i = match.index;
|
|
72251
72212
|
const char = str.charCodeAt(i);
|
|
72252
72213
|
const next = xmlCodeMap.get(char);
|
|
@@ -72255,9 +72216,9 @@ function encodeXML(str) {
|
|
|
72255
72216
|
lastIdx = i + 1;
|
|
72256
72217
|
}
|
|
72257
72218
|
else {
|
|
72258
|
-
ret += `${str.substring(lastIdx, i)}&#x${
|
|
72219
|
+
ret += `${str.substring(lastIdx, i)}&#x${escape_getCodePoint(str, i).toString(16)};`;
|
|
72259
72220
|
// Increase by 1 if we have a surrogate pair
|
|
72260
|
-
lastIdx =
|
|
72221
|
+
lastIdx = escape_xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);
|
|
72261
72222
|
}
|
|
72262
72223
|
}
|
|
72263
72224
|
return ret + str.substr(lastIdx);
|
|
@@ -72271,7 +72232,7 @@ function encodeXML(str) {
|
|
|
72271
72232
|
*
|
|
72272
72233
|
* @param data String to escape.
|
|
72273
72234
|
*/
|
|
72274
|
-
const escape_escape = (/* unused pure expression or super */ null && (
|
|
72235
|
+
const escape_escape = (/* unused pure expression or super */ null && (escape_encodeXML));
|
|
72275
72236
|
/**
|
|
72276
72237
|
* Creates a function that escapes all characters matched by the given regular
|
|
72277
72238
|
* expression using the given map of characters to escape to their entities.
|
|
@@ -72306,7 +72267,7 @@ function getEscaper(regex, map) {
|
|
|
72306
72267
|
*
|
|
72307
72268
|
* @param data String to escape.
|
|
72308
72269
|
*/
|
|
72309
|
-
const
|
|
72270
|
+
const escape_escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
|
|
72310
72271
|
/**
|
|
72311
72272
|
* Encodes all characters that have to be escaped in HTML attributes,
|
|
72312
72273
|
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
|
@@ -73285,6 +73246,13 @@ const extractText = (node) => {
|
|
|
73285
73246
|
|
|
73286
73247
|
|
|
73287
73248
|
|
|
73249
|
+
|
|
73250
|
+
|
|
73251
|
+
|
|
73252
|
+
|
|
73253
|
+
|
|
73254
|
+
const titleParser = unified().use(remarkParse).use(remarkGfm);
|
|
73255
|
+
const toMarkdownExtensions = [gfmStrikethroughToMarkdown()];
|
|
73288
73256
|
const callouts_regex = `^(${emoji_regex().source}|⚠)(\\s+|$)`;
|
|
73289
73257
|
const findFirst = (node) => {
|
|
73290
73258
|
if ('children' in node)
|
|
@@ -73401,31 +73369,65 @@ const processBlockquote = (node, index, parent) => {
|
|
|
73401
73369
|
// Example: "> ⚠️ **Bold heading**\nBody text here"
|
|
73402
73370
|
const bodyChildren = splitParagraphAtNewline(firstParagraph);
|
|
73403
73371
|
const didSplit = bodyChildren !== null;
|
|
73404
|
-
// Extract heading text after removing the icon prefix.
|
|
73405
|
-
// Use `plain()` to handle complex markdown structures (bold, inline code, etc.)
|
|
73406
|
-
const headingText = lib_plain(firstParagraph)
|
|
73407
|
-
.toString()
|
|
73408
|
-
.slice(match.length);
|
|
73409
|
-
// Clean up the raw AST by removing the icon prefix from the first text node
|
|
73410
73372
|
removeIconPrefix(firstParagraph, match.length);
|
|
73411
|
-
const
|
|
73373
|
+
const firstText = findFirst(firstParagraph);
|
|
73374
|
+
const rawValue = firstText?.value ?? '';
|
|
73375
|
+
const hasContent = rawValue.trim().length > 0 || firstParagraph.children.length > 1;
|
|
73376
|
+
const empty = !hasContent;
|
|
73412
73377
|
const theme = themes[icon] || 'default';
|
|
73413
|
-
|
|
73414
|
-
|
|
73415
|
-
|
|
73416
|
-
//
|
|
73417
|
-
|
|
73418
|
-
|
|
73378
|
+
if (hasContent || didSplit) {
|
|
73379
|
+
const headingMatch = rawValue.match(/^(#{1,6})\s*/);
|
|
73380
|
+
// # heading syntax is handled via direct AST manipulation so we can
|
|
73381
|
+
// set the depth while preserving the original inline children (bold, etc.)
|
|
73382
|
+
if (headingMatch) {
|
|
73383
|
+
firstText.value = rawValue.slice(headingMatch[0].length);
|
|
73384
|
+
const heading = wrapHeading(node);
|
|
73385
|
+
heading.depth = headingMatch[1].length;
|
|
73386
|
+
node.children[0] = heading;
|
|
73387
|
+
node.children[0].position.start.offset += match.length;
|
|
73388
|
+
node.children[0].position.start.column += match.length;
|
|
73389
|
+
}
|
|
73390
|
+
else {
|
|
73391
|
+
const headingText = toMarkdown({ type: 'root', children: [firstParagraph] }, {
|
|
73392
|
+
extensions: toMarkdownExtensions,
|
|
73393
|
+
})
|
|
73394
|
+
.trim()
|
|
73395
|
+
.replace(/^\\(?=[>#+\-*])/, '');
|
|
73396
|
+
const parsedTitle = titleParser.parse(headingText);
|
|
73397
|
+
const parsedFirstChild = parsedTitle.children[0];
|
|
73398
|
+
// Block-level syntax ("> quote", "- list") produces non-paragraph nodes;
|
|
73399
|
+
// inline text parses as a paragraph and falls through to wrapHeading().
|
|
73400
|
+
if (parsedFirstChild && parsedFirstChild.type !== 'paragraph') {
|
|
73401
|
+
// Strip positions from re-parsed nodes since they're relative to the heading text, not the original source
|
|
73402
|
+
visit(parsedTitle, (n) => {
|
|
73403
|
+
delete n.position;
|
|
73404
|
+
});
|
|
73405
|
+
const heading = wrapHeading(node);
|
|
73406
|
+
heading.children = parsedTitle.children;
|
|
73407
|
+
delete heading.position;
|
|
73408
|
+
node.children[0] = heading;
|
|
73409
|
+
}
|
|
73410
|
+
else {
|
|
73411
|
+
node.children[0] = wrapHeading(node);
|
|
73412
|
+
node.children[0].position.start.offset += match.length;
|
|
73413
|
+
node.children[0].position.start.column += match.length;
|
|
73414
|
+
}
|
|
73415
|
+
}
|
|
73419
73416
|
}
|
|
73420
73417
|
// Insert body content as a separate paragraph after the heading
|
|
73421
73418
|
if (bodyChildren) {
|
|
73419
|
+
const headingPosition = node.children[0].position;
|
|
73422
73420
|
node.children.splice(1, 0, {
|
|
73423
73421
|
type: 'paragraph',
|
|
73424
73422
|
children: bodyChildren,
|
|
73425
|
-
|
|
73426
|
-
|
|
73427
|
-
|
|
73428
|
-
|
|
73423
|
+
...(headingPosition && firstParagraphOriginalEnd
|
|
73424
|
+
? {
|
|
73425
|
+
position: {
|
|
73426
|
+
start: headingPosition.end,
|
|
73427
|
+
end: firstParagraphOriginalEnd,
|
|
73428
|
+
},
|
|
73429
|
+
}
|
|
73430
|
+
: {}),
|
|
73429
73431
|
});
|
|
73430
73432
|
}
|
|
73431
73433
|
Object.assign(node, {
|
|
@@ -73442,11 +73444,24 @@ const processBlockquote = (node, index, parent) => {
|
|
|
73442
73444
|
}
|
|
73443
73445
|
};
|
|
73444
73446
|
const calloutTransformer = () => {
|
|
73445
|
-
|
|
73446
|
-
visit(
|
|
73447
|
+
const processNode = (root) => {
|
|
73448
|
+
visit(root, 'blockquote', (node, index, parent) => {
|
|
73447
73449
|
processBlockquote(node, index, parent);
|
|
73450
|
+
if (node.type === NodeTypes.callout) {
|
|
73451
|
+
// SKIP prevents re-processing synthetic blockquotes in parsed title content
|
|
73452
|
+
// (e.g., blockquotes from "> Quote" titles). Recursively process body children
|
|
73453
|
+
// (index 1+, skipping the heading at 0) to handle nested callouts.
|
|
73454
|
+
for (let i = 1; i < node.children.length; i += 1) {
|
|
73455
|
+
processNode(node.children[i]);
|
|
73456
|
+
}
|
|
73457
|
+
return SKIP;
|
|
73458
|
+
}
|
|
73459
|
+
return undefined;
|
|
73448
73460
|
});
|
|
73449
73461
|
};
|
|
73462
|
+
return (tree) => {
|
|
73463
|
+
processNode(tree);
|
|
73464
|
+
};
|
|
73450
73465
|
};
|
|
73451
73466
|
/* harmony default export */ const callouts = (calloutTransformer);
|
|
73452
73467
|
|
|
@@ -73471,8 +73486,18 @@ const codeTabsTransformer = ({ copyButtons } = {}) => (tree) => {
|
|
|
73471
73486
|
const sibling = parent.children[walker];
|
|
73472
73487
|
if (!isCode(sibling))
|
|
73473
73488
|
break;
|
|
73489
|
+
// Check that the two code blocks are truly adjacent (no blank lines or
|
|
73490
|
+
// other content between them). The `gap` is the number of raw characters
|
|
73491
|
+
// between the end of the previous block and the start of this one.
|
|
73492
|
+
// For a LF-separated pair the gap equals `start.column` (the newline
|
|
73493
|
+
// char(s) plus any indentation). CRLF line endings add one extra byte
|
|
73494
|
+
// (\r) without advancing the line count, so we also accept
|
|
73495
|
+
// `start.column + 1` provided the blocks are still on consecutive lines.
|
|
73474
73496
|
const olderSibling = parent.children[walker - 1];
|
|
73475
|
-
|
|
73497
|
+
const gap = sibling.position.start.offset - olderSibling.position.end.offset;
|
|
73498
|
+
const lineDiff = sibling.position.start.line - olderSibling.position.end.line;
|
|
73499
|
+
const isCRLF = gap === sibling.position.start.column + 1 && lineDiff === 1;
|
|
73500
|
+
if (gap !== sibling.position.start.column && !isCRLF)
|
|
73476
73501
|
break;
|
|
73477
73502
|
children.push(sibling);
|
|
73478
73503
|
// eslint-disable-next-line no-plusplus
|
|
@@ -73563,7 +73588,7 @@ const divTransformer = () => tree => {
|
|
|
73563
73588
|
;// ./processor/transform/embeds.ts
|
|
73564
73589
|
|
|
73565
73590
|
|
|
73566
|
-
const isEmbed = (node) => 'title' in node && node.title === '@embed';
|
|
73591
|
+
const isEmbed = (node) => Boolean(node && 'title' in node && node.title === '@embed');
|
|
73567
73592
|
const embedTransformer = () => {
|
|
73568
73593
|
return (tree) => {
|
|
73569
73594
|
visit(tree, 'paragraph', (node, i, parent) => {
|
|
@@ -73571,7 +73596,7 @@ const embedTransformer = () => {
|
|
|
73571
73596
|
if (!isEmbed(child))
|
|
73572
73597
|
return;
|
|
73573
73598
|
const { url, title } = child;
|
|
73574
|
-
const label = child.children[0]
|
|
73599
|
+
const label = child.children[0]?.value;
|
|
73575
73600
|
const newNode = {
|
|
73576
73601
|
type: NodeTypes.embedBlock,
|
|
73577
73602
|
label,
|
|
@@ -91048,6 +91073,55 @@ const mdxToHast = () => tree => {
|
|
|
91048
91073
|
};
|
|
91049
91074
|
/* harmony default export */ const mdx_to_hast = (mdxToHast);
|
|
91050
91075
|
|
|
91076
|
+
;// ./lib/mdast-util/empty-task-list-item/index.ts
|
|
91077
|
+
/**
|
|
91078
|
+
* Normalizes list items that are written as only `[ ]` or `[x]` into GFM task
|
|
91079
|
+
* list items during parse, but only when at least one whitespace character
|
|
91080
|
+
* follows the closing bracket (`]`). This matches legacy behaviour for checkboxes
|
|
91081
|
+
*
|
|
91082
|
+
* The issue is `remark-gfm` does not actually classify these as task items when they have no content
|
|
91083
|
+
* after the checkbox, which leaves them as plain text (`"[ ]"`). So a custom extension is needed to
|
|
91084
|
+
* treat these as task items
|
|
91085
|
+
*/
|
|
91086
|
+
function exitListItemWithEmptyTaskListItem(token) {
|
|
91087
|
+
const node = this.stack[this.stack.length - 1];
|
|
91088
|
+
if (node &&
|
|
91089
|
+
node.type === 'listItem' &&
|
|
91090
|
+
typeof node.checked !== 'boolean') {
|
|
91091
|
+
const listItem = node;
|
|
91092
|
+
const head = listItem.children[0];
|
|
91093
|
+
if (head && head.type === 'paragraph' && head.children.length === 1) {
|
|
91094
|
+
const text = head.children[0];
|
|
91095
|
+
if (text.type === 'text') {
|
|
91096
|
+
const hasTrailingWhitespace = typeof head.position?.end.offset === 'number' &&
|
|
91097
|
+
typeof text.position?.end.offset === 'number' &&
|
|
91098
|
+
head.position.end.offset > text.position.end.offset;
|
|
91099
|
+
if (!hasTrailingWhitespace) {
|
|
91100
|
+
this.exit(token);
|
|
91101
|
+
return;
|
|
91102
|
+
}
|
|
91103
|
+
const value = text.value;
|
|
91104
|
+
if (value === '[ ]') {
|
|
91105
|
+
listItem.checked = false;
|
|
91106
|
+
head.children = [];
|
|
91107
|
+
}
|
|
91108
|
+
else if (value === '[x]' || value === '[X]') {
|
|
91109
|
+
listItem.checked = true;
|
|
91110
|
+
head.children = [];
|
|
91111
|
+
}
|
|
91112
|
+
}
|
|
91113
|
+
}
|
|
91114
|
+
}
|
|
91115
|
+
this.exit(token);
|
|
91116
|
+
}
|
|
91117
|
+
function emptyTaskListItemFromMarkdown() {
|
|
91118
|
+
return {
|
|
91119
|
+
exit: {
|
|
91120
|
+
listItem: exitListItemWithEmptyTaskListItem,
|
|
91121
|
+
},
|
|
91122
|
+
};
|
|
91123
|
+
}
|
|
91124
|
+
|
|
91051
91125
|
;// ./lib/mdast-util/legacy-variable/index.ts
|
|
91052
91126
|
|
|
91053
91127
|
const contextMap = new WeakMap();
|
|
@@ -91357,11 +91431,21 @@ function legacyVariable() {
|
|
|
91357
91431
|
*/
|
|
91358
91432
|
|
|
91359
91433
|
|
|
91434
|
+
;// ./processor/transform/mdxish/constants.ts
|
|
91435
|
+
/**
|
|
91436
|
+
* Inline component tags handled by mdxish-inline-components.ts.
|
|
91437
|
+
* Also excluded from block-level handling in mdxish-component-blocks.ts.
|
|
91438
|
+
*/
|
|
91439
|
+
const INLINE_COMPONENT_TAGS = new Set(['Anchor']);
|
|
91440
|
+
|
|
91360
91441
|
;// ./processor/transform/mdxish/mdxish-component-blocks.ts
|
|
91361
91442
|
|
|
91362
91443
|
|
|
91363
91444
|
|
|
91364
91445
|
|
|
91446
|
+
|
|
91447
|
+
|
|
91448
|
+
|
|
91365
91449
|
const pascalCaseTagPattern = /^<([A-Z][A-Za-z0-9_]*)([^>]*?)(\/?)>([\s\S]*)?$/;
|
|
91366
91450
|
const tagAttributePattern = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+))?/g;
|
|
91367
91451
|
/**
|
|
@@ -91374,14 +91458,13 @@ const MAX_LOOKAHEAD = 30;
|
|
|
91374
91458
|
* These components either have special parsing requirements that the generic component
|
|
91375
91459
|
* block transformer cannot handle correctly, or are inline components that we don't
|
|
91376
91460
|
* want to convert to mdxJsxFlowElement which is a block level element.
|
|
91377
|
-
*
|
|
91378
|
-
* Glossary and Anchor are inline components.
|
|
91379
91461
|
*/
|
|
91380
|
-
const EXCLUDED_TAGS = new Set(['HTMLBlock', 'Table', 'Glossary',
|
|
91462
|
+
const EXCLUDED_TAGS = new Set(['HTMLBlock', 'Table', 'Glossary', ...INLINE_COMPONENT_TAGS]);
|
|
91381
91463
|
const inlineMdProcessor = unified()
|
|
91382
91464
|
.data('micromarkExtensions', [legacyVariable()])
|
|
91383
|
-
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
91384
|
-
.use(remarkParse)
|
|
91465
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown()])
|
|
91466
|
+
.use(remarkParse)
|
|
91467
|
+
.use(remarkGfm);
|
|
91385
91468
|
const isClosingTag = (value, tag) => value.trim() === `</${tag}>`;
|
|
91386
91469
|
/**
|
|
91387
91470
|
* Parse markdown content into mdast children nodes.
|
|
@@ -91640,10 +91723,10 @@ const mdxishComponentBlocks = () => tree => {
|
|
|
91640
91723
|
const extraChildren = contentAfterTag ? parseMdChildren(contentAfterTag.trimStart()) : [];
|
|
91641
91724
|
// Collect all intermediate siblings between opening tag and closing tag
|
|
91642
91725
|
const intermediateChildren = parent.children.slice(index + 1, closingIndex);
|
|
91643
|
-
// For paragraph siblings, include the paragraph
|
|
91726
|
+
// For paragraph siblings, include the full paragraph (with closing tag stripped)
|
|
91644
91727
|
// For HTML siblings, include any content parsed from before the closing tag
|
|
91645
91728
|
const closingChildren = strippedParagraph
|
|
91646
|
-
? strippedParagraph.children
|
|
91729
|
+
? (strippedParagraph.children.length > 0 ? [strippedParagraph] : [])
|
|
91647
91730
|
: extraClosingChildren;
|
|
91648
91731
|
const componentNode = createComponentNode({
|
|
91649
91732
|
tag,
|
|
@@ -112305,6 +112388,46 @@ ${reformatHTML(html)}
|
|
|
112305
112388
|
};
|
|
112306
112389
|
/* harmony default export */ const html_block = (htmlBlock);
|
|
112307
112390
|
|
|
112391
|
+
;// ./processor/compile/list-item.ts
|
|
112392
|
+
|
|
112393
|
+
// Matches '*', '-', '+', '1.', '2.', '3.', etc. followed by a newline or 1-3 spaces
|
|
112394
|
+
// to be replaced with the marker and a space like `- [ ]`
|
|
112395
|
+
const listMarkerRegex = /^(?:[*+-]|\d+\.)(?:([\r\n]| {1,3})|$)/;
|
|
112396
|
+
/**
|
|
112397
|
+
* List-item serializer intended for checklist items
|
|
112398
|
+
* Uses the default listItem handler for formatting, then patches the output to inject the checkbox and preserve empty items
|
|
112399
|
+
*
|
|
112400
|
+
* The current aim is to ensure checklist items that have no text after the checkbox are serialized
|
|
112401
|
+
* with their checkbox intact (for example, `- [ ]`) instead of dropping it
|
|
112402
|
+
* We can add more adjustments if needed
|
|
112403
|
+
*/
|
|
112404
|
+
const compile_list_item_listItem = (node, parent, state, info) => {
|
|
112405
|
+
const head = node.children[0];
|
|
112406
|
+
const isCheckbox = typeof node.checked === 'boolean' && head && head.type === 'paragraph';
|
|
112407
|
+
if (!isCheckbox) {
|
|
112408
|
+
return handle.listItem(node, parent, state, info);
|
|
112409
|
+
}
|
|
112410
|
+
const checkbox = `[${node.checked ? 'x' : ' '}] `;
|
|
112411
|
+
// `tracker` keeps current column/offset for downstream line wrapping/indent
|
|
112412
|
+
// We move it by checkbox length so wrapped lines align after `[ ] ` / `[x] `
|
|
112413
|
+
const tracker = state.createTracker(info);
|
|
112414
|
+
tracker.move(checkbox);
|
|
112415
|
+
// Initialize the checkbox item with the default listItem serializer as the source of truth for spacing,
|
|
112416
|
+
// indentation, ordered marker formatting, and wrapping behavior
|
|
112417
|
+
let value = handle.listItem(node, parent, state, {
|
|
112418
|
+
...info,
|
|
112419
|
+
...tracker.current(),
|
|
112420
|
+
});
|
|
112421
|
+
// Patch and inject checkbox after the list marker token
|
|
112422
|
+
value = value.replace(listMarkerRegex, (match, separator) => {
|
|
112423
|
+
const marker = match.trim();
|
|
112424
|
+
const actualSeparator = separator || ' ';
|
|
112425
|
+
return `${marker}${actualSeparator}${checkbox}`;
|
|
112426
|
+
});
|
|
112427
|
+
return value;
|
|
112428
|
+
};
|
|
112429
|
+
/* harmony default export */ const list_item = (compile_list_item_listItem);
|
|
112430
|
+
|
|
112308
112431
|
;// ./processor/compile/plain.ts
|
|
112309
112432
|
const plain_plain = (node) => node.value;
|
|
112310
112433
|
/* harmony default export */ const compile_plain = (plain_plain);
|
|
@@ -112323,6 +112446,7 @@ const variable = (node) => `{user.${node.data?.hProperties?.name || ''}}`;
|
|
|
112323
112446
|
|
|
112324
112447
|
|
|
112325
112448
|
|
|
112449
|
+
|
|
112326
112450
|
function compilers(mdxish = false) {
|
|
112327
112451
|
const data = this.data();
|
|
112328
112452
|
const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
|
|
@@ -112340,6 +112464,7 @@ function compilers(mdxish = false) {
|
|
|
112340
112464
|
figure: compile_compatibility,
|
|
112341
112465
|
html: compile_compatibility,
|
|
112342
112466
|
i: compile_compatibility,
|
|
112467
|
+
...(mdxish && { listItem: list_item }),
|
|
112343
112468
|
plain: compile_plain,
|
|
112344
112469
|
yaml: compile_compatibility,
|
|
112345
112470
|
};
|
|
@@ -113871,6 +113996,76 @@ function remarkBreaks() {
|
|
|
113871
113996
|
}
|
|
113872
113997
|
}
|
|
113873
113998
|
|
|
113999
|
+
;// ./processor/plugin/flatten-table-cell-paragraphs.ts
|
|
114000
|
+
|
|
114001
|
+
/** List elements that cause margin issues when adjacent to paragraphs */
|
|
114002
|
+
const LIST_ELEMENTS = new Set(['ul', 'ol']);
|
|
114003
|
+
/**
|
|
114004
|
+
* Check if a child is a whitespace-only text node
|
|
114005
|
+
*/
|
|
114006
|
+
function isWhitespaceText(child) {
|
|
114007
|
+
return child.type === 'text' && !child.value.trim();
|
|
114008
|
+
}
|
|
114009
|
+
/**
|
|
114010
|
+
* Check if a child is an element with the given tag name
|
|
114011
|
+
*/
|
|
114012
|
+
function isElementWithTag(child, tags) {
|
|
114013
|
+
return child.type === 'element' && tags.has(child.tagName);
|
|
114014
|
+
}
|
|
114015
|
+
/**
|
|
114016
|
+
* Rehype plugin that flattens paragraph elements that are adjacent to lists in table cells.
|
|
114017
|
+
*
|
|
114018
|
+
* When markdown content is parsed inside JSX table cells, text before/after lists
|
|
114019
|
+
* gets wrapped in `<p>` tags. This causes unwanted spacing because both `<p>` and
|
|
114020
|
+
* list elements have margins.
|
|
114021
|
+
*
|
|
114022
|
+
* This plugin selectively unwraps only `<p>` elements that are immediately before
|
|
114023
|
+
* or after a list (`<ul>` or `<ol>`), preserving paragraphs in other contexts.
|
|
114024
|
+
*/
|
|
114025
|
+
const rehypeFlattenTableCellParagraphs = () => {
|
|
114026
|
+
return (tree) => {
|
|
114027
|
+
visit(tree, 'element', (node) => {
|
|
114028
|
+
// Only process table cells
|
|
114029
|
+
if (node.tagName !== 'td' && node.tagName !== 'th')
|
|
114030
|
+
return;
|
|
114031
|
+
const children = node.children;
|
|
114032
|
+
const newChildren = [];
|
|
114033
|
+
for (let i = 0; i < children.length; i += 1) {
|
|
114034
|
+
const child = children[i];
|
|
114035
|
+
// If not a paragraph, keep as-is
|
|
114036
|
+
if (child.type !== 'element' || child.tagName !== 'p') {
|
|
114037
|
+
newChildren.push(child);
|
|
114038
|
+
}
|
|
114039
|
+
else {
|
|
114040
|
+
// Check if this paragraph is adjacent to a list
|
|
114041
|
+
// Look at previous non-whitespace sibling
|
|
114042
|
+
let prevIndex = i - 1;
|
|
114043
|
+
while (prevIndex >= 0 && isWhitespaceText(children[prevIndex])) {
|
|
114044
|
+
prevIndex -= 1;
|
|
114045
|
+
}
|
|
114046
|
+
const prevIsNewChild = newChildren.length > 0 && newChildren[newChildren.length - 1];
|
|
114047
|
+
const prevIsList = (prevIndex >= 0 && isElementWithTag(children[prevIndex], LIST_ELEMENTS)) ||
|
|
114048
|
+
(prevIsNewChild && prevIsNewChild.type === 'element' && LIST_ELEMENTS.has(prevIsNewChild.tagName));
|
|
114049
|
+
// Look at next non-whitespace sibling
|
|
114050
|
+
let nextIndex = i + 1;
|
|
114051
|
+
while (nextIndex < children.length && isWhitespaceText(children[nextIndex])) {
|
|
114052
|
+
nextIndex += 1;
|
|
114053
|
+
}
|
|
114054
|
+
const nextIsList = nextIndex < children.length && isElementWithTag(children[nextIndex], LIST_ELEMENTS);
|
|
114055
|
+
// If adjacent to a list, flatten the paragraph
|
|
114056
|
+
if (prevIsList || nextIsList) {
|
|
114057
|
+
newChildren.push(...child.children);
|
|
114058
|
+
}
|
|
114059
|
+
else {
|
|
114060
|
+
newChildren.push(child);
|
|
114061
|
+
}
|
|
114062
|
+
}
|
|
114063
|
+
}
|
|
114064
|
+
node.children = newChildren;
|
|
114065
|
+
});
|
|
114066
|
+
};
|
|
114067
|
+
};
|
|
114068
|
+
|
|
113874
114069
|
;// ./lib/utils/mdxish/mdxish-get-component-name.ts
|
|
113875
114070
|
/** Convert a string to PascalCase */
|
|
113876
114071
|
function toPascalCase(str) {
|
|
@@ -113909,7 +114104,7 @@ function getComponentName(componentName, components) {
|
|
|
113909
114104
|
|
|
113910
114105
|
|
|
113911
114106
|
|
|
113912
|
-
const
|
|
114107
|
+
const mdxish_components_INLINE_COMPONENT_TAGS = new Set(['anchor', 'glossary']);
|
|
113913
114108
|
function isElementContentNode(node) {
|
|
113914
114109
|
return node.type === 'element' || node.type === 'text' || node.type === 'comment';
|
|
113915
114110
|
}
|
|
@@ -113991,7 +114186,7 @@ function parseTextChildren(node, processMarkdown, components) {
|
|
|
113991
114186
|
const hast = processMarkdown(child.value.trim());
|
|
113992
114187
|
const children = (hast.children ?? []).filter(isElementContentNode);
|
|
113993
114188
|
// For inline components, preserve plain text instead of wrapping in <p>
|
|
113994
|
-
if (
|
|
114189
|
+
if (mdxish_components_INLINE_COMPONENT_TAGS.has(node.tagName.toLowerCase()) && isSingleParagraphTextNode(children)) {
|
|
113995
114190
|
return [child];
|
|
113996
114191
|
}
|
|
113997
114192
|
return children;
|
|
@@ -114364,20 +114559,35 @@ function extractBalancedBraces(content, start) {
|
|
|
114364
114559
|
return { content: content.slice(start, pos - 1), end: pos };
|
|
114365
114560
|
}
|
|
114366
114561
|
/**
|
|
114367
|
-
* Escapes
|
|
114368
|
-
* Handles
|
|
114562
|
+
* Escapes problematic braces in content to prevent MDX expression parsing errors.
|
|
114563
|
+
* Handles three cases:
|
|
114564
|
+
* 1. Unbalanced braces (e.g., `{foo` without closing `}`)
|
|
114565
|
+
* 2. Paragraph-spanning expressions (e.g., `{\n\n}` where blank line splits paragraphs)
|
|
114566
|
+
* 3. Skips HTML elements to prevent backslashes appearing in output
|
|
114567
|
+
*
|
|
114369
114568
|
*/
|
|
114370
|
-
function
|
|
114371
|
-
|
|
114372
|
-
|
|
114569
|
+
function escapeProblematicBraces(content) {
|
|
114570
|
+
// Skip HTML elements — their content should never be escaped because
|
|
114571
|
+
// rehypeRaw parses them into hast elements, making `\` literal text in output
|
|
114572
|
+
const htmlElements = [];
|
|
114573
|
+
const safe = content.replace(/<([a-z][a-zA-Z0-9]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g, match => {
|
|
114574
|
+
const idx = htmlElements.length;
|
|
114575
|
+
htmlElements.push(match);
|
|
114576
|
+
return `___HTML_ELEM_${idx}___`;
|
|
114577
|
+
});
|
|
114578
|
+
const toEscape = new Set();
|
|
114579
|
+
// Convert to array of Unicode code points to handle emojis and multi-byte characters correctly
|
|
114580
|
+
const chars = Array.from(safe);
|
|
114373
114581
|
let strDelim = null;
|
|
114374
114582
|
let strEscaped = false;
|
|
114375
|
-
//
|
|
114376
|
-
const
|
|
114583
|
+
// Stack of open braces with their state
|
|
114584
|
+
const openStack = [];
|
|
114585
|
+
// Track position of last newline (outside strings) to detect blank lines
|
|
114586
|
+
let lastNewlinePos = -2; // -2 means no recent newline
|
|
114377
114587
|
for (let i = 0; i < chars.length; i += 1) {
|
|
114378
114588
|
const ch = chars[i];
|
|
114379
|
-
// Track
|
|
114380
|
-
if (
|
|
114589
|
+
// Track string delimiters inside expressions to ignore braces within them
|
|
114590
|
+
if (openStack.length > 0) {
|
|
114381
114591
|
if (strDelim) {
|
|
114382
114592
|
if (strEscaped)
|
|
114383
114593
|
strEscaped = false;
|
|
@@ -114393,6 +114603,20 @@ function escapeUnbalancedBraces(content) {
|
|
|
114393
114603
|
// eslint-disable-next-line no-continue
|
|
114394
114604
|
continue;
|
|
114395
114605
|
}
|
|
114606
|
+
// Track newlines to detect blank lines (paragraph boundaries)
|
|
114607
|
+
if (ch === '\n') {
|
|
114608
|
+
// Check if this newline creates a blank line (only whitespace since last newline)
|
|
114609
|
+
if (lastNewlinePos >= 0) {
|
|
114610
|
+
const between = chars.slice(lastNewlinePos + 1, i).join('');
|
|
114611
|
+
if (/^[ \t]*$/.test(between)) {
|
|
114612
|
+
// This is a blank line - mark all open expressions as paragraph-spanning
|
|
114613
|
+
openStack.forEach(entry => {
|
|
114614
|
+
entry.hasBlankLine = true;
|
|
114615
|
+
});
|
|
114616
|
+
}
|
|
114617
|
+
}
|
|
114618
|
+
lastNewlinePos = i;
|
|
114619
|
+
}
|
|
114396
114620
|
}
|
|
114397
114621
|
// Skip already-escaped braces (count preceding backslashes)
|
|
114398
114622
|
if (ch === '{' || ch === '}') {
|
|
@@ -114404,21 +114628,37 @@ function escapeUnbalancedBraces(content) {
|
|
|
114404
114628
|
continue;
|
|
114405
114629
|
}
|
|
114406
114630
|
}
|
|
114407
|
-
if (ch === '{')
|
|
114408
|
-
|
|
114631
|
+
if (ch === '{') {
|
|
114632
|
+
openStack.push({ pos: i, hasBlankLine: false });
|
|
114633
|
+
lastNewlinePos = -2; // Reset newline tracking for new expression
|
|
114634
|
+
}
|
|
114409
114635
|
else if (ch === '}') {
|
|
114410
|
-
if (
|
|
114411
|
-
|
|
114412
|
-
|
|
114413
|
-
|
|
114636
|
+
if (openStack.length > 0) {
|
|
114637
|
+
const entry = openStack.pop();
|
|
114638
|
+
// If expression spans paragraph boundary, escape both braces
|
|
114639
|
+
if (entry.hasBlankLine) {
|
|
114640
|
+
toEscape.add(entry.pos);
|
|
114641
|
+
toEscape.add(i);
|
|
114642
|
+
}
|
|
114643
|
+
}
|
|
114644
|
+
else {
|
|
114645
|
+
// Unbalanced closing brace (no matching open)
|
|
114646
|
+
toEscape.add(i);
|
|
114647
|
+
}
|
|
114414
114648
|
}
|
|
114415
114649
|
}
|
|
114416
|
-
|
|
114417
|
-
|
|
114418
|
-
|
|
114419
|
-
|
|
114420
|
-
|
|
114421
|
-
|
|
114650
|
+
// Any remaining open braces are unbalanced
|
|
114651
|
+
openStack.forEach(entry => toEscape.add(entry.pos));
|
|
114652
|
+
// If there are no problematic braces, return safe content as-is;
|
|
114653
|
+
// otherwise, escape each problematic `{` or `}` so MDX doesn't treat them as expressions.
|
|
114654
|
+
let result = toEscape.size === 0
|
|
114655
|
+
? safe
|
|
114656
|
+
: chars.map((ch, i) => (toEscape.has(i) ? `\\${ch}` : ch)).join('');
|
|
114657
|
+
// Restore HTML elements
|
|
114658
|
+
if (htmlElements.length > 0) {
|
|
114659
|
+
result = result.replace(/___HTML_ELEM_(\d+)___/g, (_m, idx) => htmlElements[parseInt(idx, 10)]);
|
|
114660
|
+
}
|
|
114661
|
+
return result;
|
|
114422
114662
|
}
|
|
114423
114663
|
/**
|
|
114424
114664
|
* Converts JSX attribute expressions (attribute={expression}) to HTML attributes (attribute="value").
|
|
@@ -114512,8 +114752,9 @@ function preprocessJSXExpressions(content, context = {}) {
|
|
|
114512
114752
|
// For inline expressions, we use a library to parse the expression & evaluate it later
|
|
114513
114753
|
// For attribute expressions, it was difficult to use a library to parse them, so do it manually
|
|
114514
114754
|
processed = evaluateAttributeExpressions(protectedContent, context, protectedCode);
|
|
114515
|
-
// Step 3: Escape
|
|
114516
|
-
|
|
114755
|
+
// Step 3: Escape problematic braces to prevent MDX expression parsing errors
|
|
114756
|
+
// This handles both unbalanced braces and paragraph-spanning expressions in one pass
|
|
114757
|
+
processed = escapeProblematicBraces(processed);
|
|
114517
114758
|
// Step 4: Restore protected code blocks
|
|
114518
114759
|
processed = restoreCodeBlocks(processed, protectedCode);
|
|
114519
114760
|
return processed;
|
|
@@ -114610,6 +114851,9 @@ const generateSlugForHeadings = () => (tree) => {
|
|
|
114610
114851
|
};
|
|
114611
114852
|
/* harmony default export */ const heading_slugs = (generateSlugForHeadings);
|
|
114612
114853
|
|
|
114854
|
+
// EXTERNAL MODULE: ./node_modules/@readme/variable/dist/index.js
|
|
114855
|
+
var variable_dist = __webpack_require__(4355);
|
|
114856
|
+
var variable_dist_default = /*#__PURE__*/__webpack_require__.n(variable_dist);
|
|
114613
114857
|
;// ./node_modules/rehype-parse/lib/index.js
|
|
114614
114858
|
/**
|
|
114615
114859
|
* @import {Root} from 'hast'
|
|
@@ -114675,6 +114919,311 @@ function rehypeParse(options) {
|
|
|
114675
114919
|
}
|
|
114676
114920
|
}
|
|
114677
114921
|
|
|
114922
|
+
;// ./node_modules/entities/lib/esm/generated/encode-html.js
|
|
114923
|
+
// Generated using scripts/write-encode-map.ts
|
|
114924
|
+
function restoreDiff(arr) {
|
|
114925
|
+
for (let i = 1; i < arr.length; i++) {
|
|
114926
|
+
arr[i][0] += arr[i - 1][0] + 1;
|
|
114927
|
+
}
|
|
114928
|
+
return arr;
|
|
114929
|
+
}
|
|
114930
|
+
// prettier-ignore
|
|
114931
|
+
/* harmony default export */ const encode_html = (new Map(/* #__PURE__ */ restoreDiff([[9, "	"], [0, "
"], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])));
|
|
114932
|
+
//# sourceMappingURL=encode-html.js.map
|
|
114933
|
+
;// ./node_modules/entities/lib/esm/encode.js
|
|
114934
|
+
|
|
114935
|
+
|
|
114936
|
+
const htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
|
|
114937
|
+
/**
|
|
114938
|
+
* Encodes all characters in the input using HTML entities. This includes
|
|
114939
|
+
* characters that are valid ASCII characters in HTML documents, such as `#`.
|
|
114940
|
+
*
|
|
114941
|
+
* To get a more compact output, consider using the `encodeNonAsciiHTML`
|
|
114942
|
+
* function, which will only encode characters that are not valid in HTML
|
|
114943
|
+
* documents, as well as non-ASCII characters.
|
|
114944
|
+
*
|
|
114945
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
114946
|
+
* (eg. `ü`) will be used.
|
|
114947
|
+
*/
|
|
114948
|
+
function encode_encodeHTML(data) {
|
|
114949
|
+
return encodeHTMLTrieRe(htmlReplacer, data);
|
|
114950
|
+
}
|
|
114951
|
+
/**
|
|
114952
|
+
* Encodes all non-ASCII characters, as well as characters not valid in HTML
|
|
114953
|
+
* documents using HTML entities. This function will not encode characters that
|
|
114954
|
+
* are valid in HTML documents, such as `#`.
|
|
114955
|
+
*
|
|
114956
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
114957
|
+
* (eg. `ü`) will be used.
|
|
114958
|
+
*/
|
|
114959
|
+
function encode_encodeNonAsciiHTML(data) {
|
|
114960
|
+
return encodeHTMLTrieRe(xmlReplacer, data);
|
|
114961
|
+
}
|
|
114962
|
+
function encodeHTMLTrieRe(regExp, str) {
|
|
114963
|
+
let ret = "";
|
|
114964
|
+
let lastIdx = 0;
|
|
114965
|
+
let match;
|
|
114966
|
+
while ((match = regExp.exec(str)) !== null) {
|
|
114967
|
+
const i = match.index;
|
|
114968
|
+
ret += str.substring(lastIdx, i);
|
|
114969
|
+
const char = str.charCodeAt(i);
|
|
114970
|
+
let next = htmlTrie.get(char);
|
|
114971
|
+
if (typeof next === "object") {
|
|
114972
|
+
// We are in a branch. Try to match the next char.
|
|
114973
|
+
if (i + 1 < str.length) {
|
|
114974
|
+
const nextChar = str.charCodeAt(i + 1);
|
|
114975
|
+
const value = typeof next.n === "number"
|
|
114976
|
+
? next.n === nextChar
|
|
114977
|
+
? next.o
|
|
114978
|
+
: undefined
|
|
114979
|
+
: next.n.get(nextChar);
|
|
114980
|
+
if (value !== undefined) {
|
|
114981
|
+
ret += value;
|
|
114982
|
+
lastIdx = regExp.lastIndex += 1;
|
|
114983
|
+
continue;
|
|
114984
|
+
}
|
|
114985
|
+
}
|
|
114986
|
+
next = next.v;
|
|
114987
|
+
}
|
|
114988
|
+
// We might have a tree node without a value; skip and use a numeric entity.
|
|
114989
|
+
if (next !== undefined) {
|
|
114990
|
+
ret += next;
|
|
114991
|
+
lastIdx = i + 1;
|
|
114992
|
+
}
|
|
114993
|
+
else {
|
|
114994
|
+
const cp = getCodePoint(str, i);
|
|
114995
|
+
ret += `&#x${cp.toString(16)};`;
|
|
114996
|
+
// Increase by 1 if we have a surrogate pair
|
|
114997
|
+
lastIdx = regExp.lastIndex += Number(cp !== char);
|
|
114998
|
+
}
|
|
114999
|
+
}
|
|
115000
|
+
return ret + str.substr(lastIdx);
|
|
115001
|
+
}
|
|
115002
|
+
//# sourceMappingURL=encode.js.map
|
|
115003
|
+
;// ./node_modules/entities/lib/esm/index.js
|
|
115004
|
+
|
|
115005
|
+
|
|
115006
|
+
|
|
115007
|
+
/** The level of entities to support. */
|
|
115008
|
+
var EntityLevel;
|
|
115009
|
+
(function (EntityLevel) {
|
|
115010
|
+
/** Support only XML entities. */
|
|
115011
|
+
EntityLevel[EntityLevel["XML"] = 0] = "XML";
|
|
115012
|
+
/** Support HTML entities, which are a superset of XML entities. */
|
|
115013
|
+
EntityLevel[EntityLevel["HTML"] = 1] = "HTML";
|
|
115014
|
+
})(EntityLevel || (EntityLevel = {}));
|
|
115015
|
+
var EncodingMode;
|
|
115016
|
+
(function (EncodingMode) {
|
|
115017
|
+
/**
|
|
115018
|
+
* The output is UTF-8 encoded. Only characters that need escaping within
|
|
115019
|
+
* XML will be escaped.
|
|
115020
|
+
*/
|
|
115021
|
+
EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8";
|
|
115022
|
+
/**
|
|
115023
|
+
* The output consists only of ASCII characters. Characters that need
|
|
115024
|
+
* escaping within HTML, and characters that aren't ASCII characters will
|
|
115025
|
+
* be escaped.
|
|
115026
|
+
*/
|
|
115027
|
+
EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII";
|
|
115028
|
+
/**
|
|
115029
|
+
* Encode all characters that have an equivalent entity, as well as all
|
|
115030
|
+
* characters that are not ASCII characters.
|
|
115031
|
+
*/
|
|
115032
|
+
EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive";
|
|
115033
|
+
/**
|
|
115034
|
+
* Encode all characters that have to be escaped in HTML attributes,
|
|
115035
|
+
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
|
115036
|
+
*/
|
|
115037
|
+
EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute";
|
|
115038
|
+
/**
|
|
115039
|
+
* Encode all characters that have to be escaped in HTML text,
|
|
115040
|
+
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
|
115041
|
+
*/
|
|
115042
|
+
EncodingMode[EncodingMode["Text"] = 4] = "Text";
|
|
115043
|
+
})(EncodingMode || (EncodingMode = {}));
|
|
115044
|
+
/**
|
|
115045
|
+
* Decodes a string with entities.
|
|
115046
|
+
*
|
|
115047
|
+
* @param data String to decode.
|
|
115048
|
+
* @param options Decoding options.
|
|
115049
|
+
*/
|
|
115050
|
+
function esm_decode(data, options = EntityLevel.XML) {
|
|
115051
|
+
const level = typeof options === "number" ? options : options.level;
|
|
115052
|
+
if (level === EntityLevel.HTML) {
|
|
115053
|
+
const mode = typeof options === "object" ? options.mode : undefined;
|
|
115054
|
+
return decodeHTML(data, mode);
|
|
115055
|
+
}
|
|
115056
|
+
return decodeXML(data);
|
|
115057
|
+
}
|
|
115058
|
+
/**
|
|
115059
|
+
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
|
|
115060
|
+
*
|
|
115061
|
+
* @param data String to decode.
|
|
115062
|
+
* @param options Decoding options.
|
|
115063
|
+
* @deprecated Use `decode` with the `mode` set to `Strict`.
|
|
115064
|
+
*/
|
|
115065
|
+
function decodeStrict(data, options = EntityLevel.XML) {
|
|
115066
|
+
var _a;
|
|
115067
|
+
const opts = typeof options === "number" ? { level: options } : options;
|
|
115068
|
+
(_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict);
|
|
115069
|
+
return esm_decode(data, opts);
|
|
115070
|
+
}
|
|
115071
|
+
/**
|
|
115072
|
+
* Encodes a string with entities.
|
|
115073
|
+
*
|
|
115074
|
+
* @param data String to encode.
|
|
115075
|
+
* @param options Encoding options.
|
|
115076
|
+
*/
|
|
115077
|
+
function esm_encode(data, options = EntityLevel.XML) {
|
|
115078
|
+
const opts = typeof options === "number" ? { level: options } : options;
|
|
115079
|
+
// Mode `UTF8` just escapes XML entities
|
|
115080
|
+
if (opts.mode === EncodingMode.UTF8)
|
|
115081
|
+
return escapeUTF8(data);
|
|
115082
|
+
if (opts.mode === EncodingMode.Attribute)
|
|
115083
|
+
return escapeAttribute(data);
|
|
115084
|
+
if (opts.mode === EncodingMode.Text)
|
|
115085
|
+
return escapeText(data);
|
|
115086
|
+
if (opts.level === EntityLevel.HTML) {
|
|
115087
|
+
if (opts.mode === EncodingMode.ASCII) {
|
|
115088
|
+
return encodeNonAsciiHTML(data);
|
|
115089
|
+
}
|
|
115090
|
+
return encodeHTML(data);
|
|
115091
|
+
}
|
|
115092
|
+
// ASCII and Extensive are equivalent
|
|
115093
|
+
return encodeXML(data);
|
|
115094
|
+
}
|
|
115095
|
+
|
|
115096
|
+
|
|
115097
|
+
|
|
115098
|
+
//# sourceMappingURL=index.js.map
|
|
115099
|
+
;// ./lib/micromark/loose-html-entities/syntax.ts
|
|
115100
|
+
|
|
115101
|
+
|
|
115102
|
+
|
|
115103
|
+
const MAX_ENTITY_LENGTH = 32;
|
|
115104
|
+
const looseHtmlEntityConstruct = {
|
|
115105
|
+
name: 'looseHtmlEntity',
|
|
115106
|
+
tokenize: tokenizeLooseHtmlEntity,
|
|
115107
|
+
};
|
|
115108
|
+
function resolveEntity(name) {
|
|
115109
|
+
const input = `&${name};`;
|
|
115110
|
+
const decoded = decodeHTMLStrict(input);
|
|
115111
|
+
return decoded !== input ? decoded : undefined;
|
|
115112
|
+
}
|
|
115113
|
+
function tokenizeLooseHtmlEntity(effects, ok, nok) {
|
|
115114
|
+
let length = 0;
|
|
115115
|
+
const start = (code) => {
|
|
115116
|
+
if (code !== codes.ampersand)
|
|
115117
|
+
return nok(code);
|
|
115118
|
+
effects.enter('looseHtmlEntity');
|
|
115119
|
+
effects.consume(code);
|
|
115120
|
+
return afterAmpersand;
|
|
115121
|
+
};
|
|
115122
|
+
const afterAmpersand = (code) => {
|
|
115123
|
+
if (code === codes.numberSign) {
|
|
115124
|
+
effects.consume(code);
|
|
115125
|
+
return afterHash;
|
|
115126
|
+
}
|
|
115127
|
+
return accumulateNamed(code);
|
|
115128
|
+
};
|
|
115129
|
+
const afterHash = (code) => {
|
|
115130
|
+
if (code === codes.lowercaseX || code === codes.uppercaseX) {
|
|
115131
|
+
effects.consume(code);
|
|
115132
|
+
return accumulateHex;
|
|
115133
|
+
}
|
|
115134
|
+
return accumulateDecimal(code);
|
|
115135
|
+
};
|
|
115136
|
+
const accumulateNamed = (code) => {
|
|
115137
|
+
if (asciiAlphanumeric(code) && length < MAX_ENTITY_LENGTH) {
|
|
115138
|
+
effects.consume(code);
|
|
115139
|
+
length += 1;
|
|
115140
|
+
return accumulateNamed;
|
|
115141
|
+
}
|
|
115142
|
+
if (length === 0)
|
|
115143
|
+
return nok(code);
|
|
115144
|
+
if (code === codes.semicolon)
|
|
115145
|
+
return nok(code);
|
|
115146
|
+
effects.exit('looseHtmlEntity');
|
|
115147
|
+
return ok(code);
|
|
115148
|
+
};
|
|
115149
|
+
const accumulateDecimal = (code) => {
|
|
115150
|
+
if (asciiDigit(code) && length < MAX_ENTITY_LENGTH) {
|
|
115151
|
+
effects.consume(code);
|
|
115152
|
+
length += 1;
|
|
115153
|
+
return accumulateDecimal;
|
|
115154
|
+
}
|
|
115155
|
+
if (length === 0)
|
|
115156
|
+
return nok(code);
|
|
115157
|
+
if (code === codes.semicolon)
|
|
115158
|
+
return nok(code);
|
|
115159
|
+
effects.exit('looseHtmlEntity');
|
|
115160
|
+
return ok(code);
|
|
115161
|
+
};
|
|
115162
|
+
const accumulateHex = (code) => {
|
|
115163
|
+
if (asciiHexDigit(code) && length < MAX_ENTITY_LENGTH) {
|
|
115164
|
+
effects.consume(code);
|
|
115165
|
+
length += 1;
|
|
115166
|
+
return accumulateHex;
|
|
115167
|
+
}
|
|
115168
|
+
if (length === 0)
|
|
115169
|
+
return nok(code);
|
|
115170
|
+
if (code === codes.semicolon)
|
|
115171
|
+
return nok(code);
|
|
115172
|
+
effects.exit('looseHtmlEntity');
|
|
115173
|
+
return ok(code);
|
|
115174
|
+
};
|
|
115175
|
+
return start;
|
|
115176
|
+
}
|
|
115177
|
+
function exitLooseHtmlEntity(token) {
|
|
115178
|
+
const raw = this.sliceSerialize(token);
|
|
115179
|
+
const entityChars = raw.slice(1);
|
|
115180
|
+
if (entityChars.startsWith('#')) {
|
|
115181
|
+
const decoded = resolveEntity(entityChars);
|
|
115182
|
+
if (decoded) {
|
|
115183
|
+
this.enter({ type: 'text', value: decoded }, token);
|
|
115184
|
+
this.exit(token);
|
|
115185
|
+
return;
|
|
115186
|
+
}
|
|
115187
|
+
}
|
|
115188
|
+
else {
|
|
115189
|
+
for (let len = entityChars.length; len >= 2; len -= 1) {
|
|
115190
|
+
const candidate = entityChars.slice(0, len);
|
|
115191
|
+
const decoded = resolveEntity(candidate);
|
|
115192
|
+
if (decoded) {
|
|
115193
|
+
const remainder = entityChars.slice(len);
|
|
115194
|
+
this.enter({ type: 'text', value: decoded + remainder }, token);
|
|
115195
|
+
this.exit(token);
|
|
115196
|
+
return;
|
|
115197
|
+
}
|
|
115198
|
+
}
|
|
115199
|
+
}
|
|
115200
|
+
this.enter({ type: 'text', value: raw }, token);
|
|
115201
|
+
this.exit(token);
|
|
115202
|
+
}
|
|
115203
|
+
function looseHtmlEntity() {
|
|
115204
|
+
return {
|
|
115205
|
+
text: { [codes.ampersand]: looseHtmlEntityConstruct },
|
|
115206
|
+
};
|
|
115207
|
+
}
|
|
115208
|
+
function looseHtmlEntityFromMarkdown() {
|
|
115209
|
+
return {
|
|
115210
|
+
exit: {
|
|
115211
|
+
looseHtmlEntity: exitLooseHtmlEntity,
|
|
115212
|
+
},
|
|
115213
|
+
};
|
|
115214
|
+
}
|
|
115215
|
+
|
|
115216
|
+
;// ./lib/micromark/loose-html-entities/index.ts
|
|
115217
|
+
/**
|
|
115218
|
+
* Micromark extension for HTML entities without semicolons.
|
|
115219
|
+
*
|
|
115220
|
+
* Handles named entities (e.g. ` `, `&`, `©`), decimal numeric
|
|
115221
|
+
* references (e.g. ` `, `©`), and hex numeric references (e.g. ` `,
|
|
115222
|
+
* ` `). Entities that already include the semicolon are left for the
|
|
115223
|
+
* standard parser to handle.
|
|
115224
|
+
*/
|
|
115225
|
+
|
|
115226
|
+
|
|
114678
115227
|
;// ./processor/transform/mdxish/normalize-malformed-md-syntax.ts
|
|
114679
115228
|
|
|
114680
115229
|
// Marker patterns for multi-node emphasis detection
|
|
@@ -115091,6 +115640,11 @@ const EMPTY_CODE_PLACEHOLDER = {
|
|
|
115091
115640
|
|
|
115092
115641
|
|
|
115093
115642
|
|
|
115643
|
+
|
|
115644
|
+
|
|
115645
|
+
|
|
115646
|
+
|
|
115647
|
+
|
|
115094
115648
|
|
|
115095
115649
|
|
|
115096
115650
|
/**
|
|
@@ -115132,18 +115686,23 @@ const preprocessBody = (text) => {
|
|
|
115132
115686
|
};
|
|
115133
115687
|
/** Markdown parser */
|
|
115134
115688
|
const contentParser = unified()
|
|
115135
|
-
.data('micromarkExtensions', [legacyVariable()])
|
|
115136
|
-
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
115689
|
+
.data('micromarkExtensions', [legacyVariable(), looseHtmlEntity()])
|
|
115690
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown(), looseHtmlEntityFromMarkdown()])
|
|
115137
115691
|
.use(remarkParse)
|
|
115138
115692
|
.use(remarkBreaks)
|
|
115139
115693
|
.use(remarkGfm)
|
|
115140
115694
|
.use(normalize_malformed_md_syntax);
|
|
115141
|
-
/**
|
|
115695
|
+
/**
|
|
115696
|
+
* Markdown to HTML processor (mdast → hast → HTML string).
|
|
115697
|
+
*
|
|
115698
|
+
* Uses only strikethrough from GFM instead of the full remarkGfm bundle
|
|
115699
|
+
* since we've had a case where it was causing a stack overflow when parsing HTML blocks containing URLs
|
|
115700
|
+
* such as `<ul><li>https://a</li>\n</ul>` due to subtokenizing recursion for URLs
|
|
115701
|
+
*/
|
|
115142
115702
|
const markdownToHtml = unified()
|
|
115143
|
-
.data('micromarkExtensions', [legacyVariable()])
|
|
115144
|
-
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
115703
|
+
.data('micromarkExtensions', [gfmStrikethrough(), legacyVariable(), looseHtmlEntity()])
|
|
115704
|
+
.data('fromMarkdownExtensions', [gfmStrikethroughFromMarkdown(), legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown(), looseHtmlEntityFromMarkdown()])
|
|
115145
115705
|
.use(remarkParse)
|
|
115146
|
-
.use(remarkGfm)
|
|
115147
115706
|
.use(normalize_malformed_md_syntax)
|
|
115148
115707
|
.use(remarkRehype)
|
|
115149
115708
|
.use(rehypeStringify);
|
|
@@ -115155,7 +115714,12 @@ const htmlStringifier = unified().use(rehypeStringify);
|
|
|
115155
115714
|
const processBackslashEscapes = (text) => text.replace(/\\<([^>]*)>/g, '<$1>').replace(/\\([<>|])/g, (_, c) => (c === '<' ? '<' : c === '>' ? '>' : c));
|
|
115156
115715
|
/** Block-level HTML tags that trigger CommonMark type 6 HTML blocks (condition 6). */
|
|
115157
115716
|
const BLOCK_LEVEL_TAGS = new Set(htmlBlockNames);
|
|
115158
|
-
const escapeInvalidTags = (str) => str.replace(HTML_TAG_RE, (match, tag, rest) => {
|
|
115717
|
+
const escapeInvalidTags = (str) => str.replace(HTML_TAG_RE, (match, tag, rest, offset, input) => {
|
|
115718
|
+
// Don't escape legacy variable syntax like <<var>> since we want to parse it
|
|
115719
|
+
// with the tokenizer and not want the <var> to get parsed as an HTML tag
|
|
115720
|
+
const isLegacyVariable = offset > 0 && input[offset - 1] === '<' && offset < input.length - 1 && input[offset + match.length] === '>';
|
|
115721
|
+
if (isLegacyVariable)
|
|
115722
|
+
return match;
|
|
115159
115723
|
const tagName = tag.replace(/^\//, '');
|
|
115160
115724
|
if (STANDARD_HTML_TAGS.has(tagName.toLowerCase()))
|
|
115161
115725
|
return match;
|
|
@@ -115175,9 +115739,20 @@ const escapeInvalidTags = (str) => str.replace(HTML_TAG_RE, (match, tag, rest) =
|
|
|
115175
115739
|
* (it treats unknown tags as void elements, stripping their children).
|
|
115176
115740
|
*/
|
|
115177
115741
|
const processMarkdownInHtmlString = (html) => {
|
|
115742
|
+
let htmlContent = html;
|
|
115743
|
+
// Replace all occurrences of legacy variable syntax like <<name>> with placeholders so the inner
|
|
115744
|
+
// <name> doesn't get parsed as an HTML tag and the tokenizer can parse it
|
|
115745
|
+
const legacyVars = {};
|
|
115746
|
+
let legacyCounter = 0;
|
|
115747
|
+
htmlContent = htmlContent.replace(new RegExp(variable_dist.VARIABLE_REGEXP, 'g'), match => {
|
|
115748
|
+
const id = `RDMX_LEGACY_VAR_${(legacyCounter += 1)}_TOKEN`;
|
|
115749
|
+
legacyVars[id] = match;
|
|
115750
|
+
return id;
|
|
115751
|
+
});
|
|
115178
115752
|
const placeholders = [];
|
|
115179
115753
|
let counter = 0;
|
|
115180
|
-
|
|
115754
|
+
// Escape invalid html tags so they don't get parsed as HTML tags
|
|
115755
|
+
const safened = escapeInvalidTags(htmlContent).replace(HTML_TAG_RE, match => {
|
|
115181
115756
|
if (!/^<\/?[A-Z]/.test(match))
|
|
115182
115757
|
return match;
|
|
115183
115758
|
const id = `<!--PC${(counter += 1)}-->`;
|
|
@@ -115188,7 +115763,10 @@ const processMarkdownInHtmlString = (html) => {
|
|
|
115188
115763
|
const textToHast = (text) => {
|
|
115189
115764
|
if (!text.trim())
|
|
115190
115765
|
return [{ type: 'text', value: text }];
|
|
115191
|
-
|
|
115766
|
+
// Restore legacy variables
|
|
115767
|
+
const restoredText = Object.entries(legacyVars).reduce((res, [id, original]) => res.replace(id, original), text);
|
|
115768
|
+
// Cell children might have html that needs to be parsed as markdown
|
|
115769
|
+
const parsed = markdownToHtml.runSync(markdownToHtml.parse(escapeInvalidTags(restoredText)));
|
|
115192
115770
|
const nodes = parsed.children.flatMap(n => n.type === 'element' && n.tagName === 'p' ? n.children : [n]);
|
|
115193
115771
|
const leading = text.match(/^\s+/)?.[0];
|
|
115194
115772
|
const trailing = text.match(/\s+$/)?.[0];
|
|
@@ -115941,10 +116519,82 @@ const mdxishHtmlBlocks = () => tree => {
|
|
|
115941
116519
|
};
|
|
115942
116520
|
/* harmony default export */ const mdxish_html_blocks = (mdxishHtmlBlocks);
|
|
115943
116521
|
|
|
116522
|
+
;// ./processor/transform/mdxish/mdxish-inline-components.ts
|
|
116523
|
+
|
|
116524
|
+
|
|
116525
|
+
|
|
116526
|
+
// Matches any PascalCase inline component opening tag. Groups: (name, attrs).
|
|
116527
|
+
// Uses [A-Za-z0-9_]* to match block version in mdxish-component-blocks.ts
|
|
116528
|
+
const INLINE_COMPONENT_OPEN_RE = /^<([A-Z][A-Za-z0-9_]*)(\s[^>]*)?>$/;
|
|
116529
|
+
function toMdxJsxTextElement(name, attributes, children) {
|
|
116530
|
+
return {
|
|
116531
|
+
type: 'mdxJsxTextElement',
|
|
116532
|
+
name,
|
|
116533
|
+
attributes,
|
|
116534
|
+
children,
|
|
116535
|
+
};
|
|
116536
|
+
}
|
|
116537
|
+
/**
|
|
116538
|
+
* Transforms inline html component nodes (e.g. <Anchor>) into proper MDAST phrasing content.
|
|
116539
|
+
*
|
|
116540
|
+
* Inline components are excluded from mdxishComponentBlocks (which only handles block-level
|
|
116541
|
+
* elements), so they remain as scattered html/text/html sibling nodes inside a paragraph.
|
|
116542
|
+
* This plugin merges them into a single typed MDAST node.
|
|
116543
|
+
*/
|
|
116544
|
+
const mdxishInlineComponents = () => tree => {
|
|
116545
|
+
visit(tree, 'html', (node, index, parent) => {
|
|
116546
|
+
if (!parent || index === undefined)
|
|
116547
|
+
return;
|
|
116548
|
+
const match = node.value?.match(INLINE_COMPONENT_OPEN_RE);
|
|
116549
|
+
if (!match)
|
|
116550
|
+
return;
|
|
116551
|
+
const [, name, attrStr] = match;
|
|
116552
|
+
if (!INLINE_COMPONENT_TAGS.has(name))
|
|
116553
|
+
return;
|
|
116554
|
+
// Parse attributes directly - preserves all attribute types (strings, booleans, objects, arrays)
|
|
116555
|
+
const attributes = parseAttributes(attrStr ?? '');
|
|
116556
|
+
// Find closing tag with whitespace-tolerant matching
|
|
116557
|
+
let closeIdx = index + 1;
|
|
116558
|
+
while (closeIdx < parent.children.length) {
|
|
116559
|
+
const sib = parent.children[closeIdx];
|
|
116560
|
+
if (sib.type === 'html' && sib.value?.trim() === `</${name}>`)
|
|
116561
|
+
break;
|
|
116562
|
+
closeIdx += 1;
|
|
116563
|
+
}
|
|
116564
|
+
if (closeIdx >= parent.children.length)
|
|
116565
|
+
return;
|
|
116566
|
+
// Extract all nodes between opening tag (index) and closing tag (closeIdx).
|
|
116567
|
+
// These are the inline component's children (e.g., text, emphasis, links).
|
|
116568
|
+
// Example: "<Anchor>click **here**</Anchor>" → children = [text, strong]
|
|
116569
|
+
const children = parent.children.slice(index + 1, closeIdx);
|
|
116570
|
+
const newNode = toMdxJsxTextElement(name, attributes, children);
|
|
116571
|
+
parent.children.splice(index, closeIdx - index + 1, newNode);
|
|
116572
|
+
});
|
|
116573
|
+
};
|
|
116574
|
+
/* harmony default export */ const mdxish_inline_components = (mdxishInlineComponents);
|
|
116575
|
+
|
|
115944
116576
|
;// ./processor/transform/mdxish/mdxish-jsx-to-mdast.ts
|
|
115945
116577
|
|
|
115946
116578
|
|
|
115947
116579
|
|
|
116580
|
+
const transformAnchor = (jsx) => {
|
|
116581
|
+
const attrs = getAttrs(jsx);
|
|
116582
|
+
const { href = '', label, target, title } = attrs;
|
|
116583
|
+
return {
|
|
116584
|
+
type: NodeTypes.anchor,
|
|
116585
|
+
children: jsx.children,
|
|
116586
|
+
data: {
|
|
116587
|
+
hName: 'Anchor',
|
|
116588
|
+
hProperties: {
|
|
116589
|
+
href,
|
|
116590
|
+
...(label && { label }),
|
|
116591
|
+
...(target && { target }),
|
|
116592
|
+
...(title && { title }),
|
|
116593
|
+
},
|
|
116594
|
+
},
|
|
116595
|
+
position: jsx.position,
|
|
116596
|
+
};
|
|
116597
|
+
};
|
|
115948
116598
|
const transformImage = (jsx) => {
|
|
115949
116599
|
const attrs = getAttrs(jsx);
|
|
115950
116600
|
const { align, alt = '', border, caption, className, height, lazy, src = '', title = '', width } = attrs;
|
|
@@ -115998,7 +116648,7 @@ const transformCallout = (jsx) => {
|
|
|
115998
116648
|
};
|
|
115999
116649
|
const transformEmbed = (jsx) => {
|
|
116000
116650
|
const attrs = getAttrs(jsx);
|
|
116001
|
-
const { favicon, html, iframe, image, providerName, providerUrl, title = '', url = '' } = attrs;
|
|
116651
|
+
const { favicon, height, html, iframe, image, providerName, providerUrl, title = '', typeOfEmbed, url = '', width } = attrs;
|
|
116002
116652
|
return {
|
|
116003
116653
|
type: NodeTypes.embedBlock,
|
|
116004
116654
|
title,
|
|
@@ -116009,11 +116659,14 @@ const transformEmbed = (jsx) => {
|
|
|
116009
116659
|
title,
|
|
116010
116660
|
url,
|
|
116011
116661
|
...(favicon && { favicon }),
|
|
116662
|
+
...(height && { height }),
|
|
116012
116663
|
...(html && { html }),
|
|
116013
116664
|
...(iframe !== undefined && { iframe }),
|
|
116014
116665
|
...(image && { image }),
|
|
116015
116666
|
...(providerName && { providerName }),
|
|
116016
116667
|
...(providerUrl && { providerUrl }),
|
|
116668
|
+
...(typeOfEmbed && { typeOfEmbed }),
|
|
116669
|
+
...(width && { width }),
|
|
116017
116670
|
},
|
|
116018
116671
|
},
|
|
116019
116672
|
position: jsx.position,
|
|
@@ -116109,7 +116762,7 @@ const COMPONENT_MAP = {
|
|
|
116109
116762
|
* This is controlled by the `newEditorTypes` flag to maintain backwards compatibility.
|
|
116110
116763
|
*/
|
|
116111
116764
|
const mdxishJsxToMdast = () => tree => {
|
|
116112
|
-
//
|
|
116765
|
+
// Block JSX components (Image, Callout, Embed, Recipe)
|
|
116113
116766
|
visit(tree, 'mdxJsxFlowElement', (node, index, parent) => {
|
|
116114
116767
|
if (!parent || index === undefined || !node.name)
|
|
116115
116768
|
return;
|
|
@@ -116120,6 +116773,15 @@ const mdxishJsxToMdast = () => tree => {
|
|
|
116120
116773
|
// Replace the JSX node with the MDAST node
|
|
116121
116774
|
parent.children[index] = newNode;
|
|
116122
116775
|
});
|
|
116776
|
+
// Inline JSX components (Anchor)
|
|
116777
|
+
visit(tree, 'mdxJsxTextElement', (node, index, parent) => {
|
|
116778
|
+
if (!parent || index === undefined || !node.name)
|
|
116779
|
+
return;
|
|
116780
|
+
if (node.name === 'Anchor') {
|
|
116781
|
+
const newNode = transformAnchor(node);
|
|
116782
|
+
parent.children[index] = newNode;
|
|
116783
|
+
}
|
|
116784
|
+
});
|
|
116123
116785
|
// Transform magic block images (type: 'image') to image-block
|
|
116124
116786
|
// Note: Standard markdown images are wrapped in paragraphs and handled by imageTransformer
|
|
116125
116787
|
// Magic block images are direct children of root, so we handle them here
|
|
@@ -116481,9 +117143,6 @@ function terminateHtmlFlowBlocks(content) {
|
|
|
116481
117143
|
return restoreCodeBlocks(result.join('\n'), protectedCode);
|
|
116482
117144
|
}
|
|
116483
117145
|
|
|
116484
|
-
// EXTERNAL MODULE: ./node_modules/@readme/variable/dist/index.js
|
|
116485
|
-
var variable_dist = __webpack_require__(4355);
|
|
116486
|
-
var variable_dist_default = /*#__PURE__*/__webpack_require__.n(variable_dist);
|
|
116487
117146
|
;// ./processor/transform/mdxish/variables-code.ts
|
|
116488
117147
|
|
|
116489
117148
|
|
|
@@ -117710,6 +118369,10 @@ function loadComponents() {
|
|
|
117710
118369
|
|
|
117711
118370
|
|
|
117712
118371
|
|
|
118372
|
+
|
|
118373
|
+
|
|
118374
|
+
|
|
118375
|
+
|
|
117713
118376
|
|
|
117714
118377
|
|
|
117715
118378
|
|
|
@@ -117758,10 +118421,12 @@ function mdxishAstProcessor(mdContent, opts = {}) {
|
|
|
117758
118421
|
text: mdxExprExt.text,
|
|
117759
118422
|
};
|
|
117760
118423
|
const processor = unified()
|
|
117761
|
-
.data('micromarkExtensions', safeMode
|
|
118424
|
+
.data('micromarkExtensions', safeMode
|
|
118425
|
+
? [magicBlock(), legacyVariable(), looseHtmlEntity()]
|
|
118426
|
+
: [magicBlock(), mdxExprTextOnly, legacyVariable(), looseHtmlEntity()])
|
|
117762
118427
|
.data('fromMarkdownExtensions', safeMode
|
|
117763
|
-
? [magicBlockFromMarkdown(), legacyVariableFromMarkdown()]
|
|
117764
|
-
: [magicBlockFromMarkdown(), mdxExpressionFromMarkdown(), legacyVariableFromMarkdown()])
|
|
118428
|
+
? [magicBlockFromMarkdown(), legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown(), looseHtmlEntityFromMarkdown()]
|
|
118429
|
+
: [magicBlockFromMarkdown(), mdxExpressionFromMarkdown(), legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown(), looseHtmlEntityFromMarkdown()])
|
|
117765
118430
|
.use(remarkParse)
|
|
117766
118431
|
.use(remarkFrontmatter)
|
|
117767
118432
|
.use(normalize_malformed_md_syntax)
|
|
@@ -117772,7 +118437,9 @@ function mdxishAstProcessor(mdContent, opts = {}) {
|
|
|
117772
118437
|
.use(restore_snake_case_component_name, { mapping: snakeCaseMapping })
|
|
117773
118438
|
.use(mdxish_tables)
|
|
117774
118439
|
.use(mdxish_html_blocks)
|
|
117775
|
-
.use(newEditorTypes ?
|
|
118440
|
+
.use(newEditorTypes ? mdxish_inline_components : undefined) // Merge inline html components (e.g. <Anchor>) into MDAST nodes
|
|
118441
|
+
.use(newEditorTypes ? mdxish_jsx_to_mdast : undefined) // Convert block JSX elements to MDAST types
|
|
118442
|
+
.use(safeMode ? undefined : evaluate_expressions, { context: jsxContext }) // Evaluate MDX expressions using jsxContext
|
|
117776
118443
|
.use(variables_text) // Parse {user.*} patterns from text nodes
|
|
117777
118444
|
.use(useTailwind ? transform_tailwind : undefined, { components: tempComponentsMap })
|
|
117778
118445
|
.use(remarkGfm);
|
|
@@ -117825,6 +118492,7 @@ function mdxish(mdContent, opts = {}) {
|
|
|
117825
118492
|
.use(preserveBooleanProperties) // RehypeRaw converts boolean properties to empty strings
|
|
117826
118493
|
.use(rehypeRaw, { passThrough: ['html-block'] })
|
|
117827
118494
|
.use(restoreBooleanProperties)
|
|
118495
|
+
.use(rehypeFlattenTableCellParagraphs) // Remove <p> wrappers inside table cells to prevent margin issues
|
|
117828
118496
|
.use(mdxish_mermaid) // Add mermaid-render className to pre wrappers
|
|
117829
118497
|
.use(heading_slugs)
|
|
117830
118498
|
.use(rehypeMdxishComponents, {
|