@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.js
CHANGED
|
@@ -34347,21 +34347,8 @@ function syntax_tokenizeIndent(effects, ok, nok) {
|
|
|
34347
34347
|
|
|
34348
34348
|
;// ./node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
|
|
34349
34349
|
/**
|
|
34350
|
-
* @
|
|
34351
|
-
* @
|
|
34352
|
-
* @typedef {import('micromark-util-types').Resolver} Resolver
|
|
34353
|
-
* @typedef {import('micromark-util-types').State} State
|
|
34354
|
-
* @typedef {import('micromark-util-types').Token} Token
|
|
34355
|
-
* @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
|
|
34356
|
-
* @typedef {import('micromark-util-types').Tokenizer} Tokenizer
|
|
34357
|
-
*
|
|
34358
|
-
* @typedef Options
|
|
34359
|
-
* Configuration (optional).
|
|
34360
|
-
* @property {boolean | null | undefined} [singleTilde=true]
|
|
34361
|
-
* Whether to support strikethrough with a single tilde (default: `true`).
|
|
34362
|
-
*
|
|
34363
|
-
* Single tildes work on github.com, but are technically prohibited by the
|
|
34364
|
-
* GFM spec.
|
|
34350
|
+
* @import {Options} from 'micromark-extension-gfm-strikethrough'
|
|
34351
|
+
* @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
|
|
34365
34352
|
*/
|
|
34366
34353
|
|
|
34367
34354
|
|
|
@@ -34377,14 +34364,15 @@ function syntax_tokenizeIndent(effects, ok, nok) {
|
|
|
34377
34364
|
* enable GFM strikethrough syntax.
|
|
34378
34365
|
*/
|
|
34379
34366
|
function gfmStrikethrough(options) {
|
|
34380
|
-
const options_ = options || {}
|
|
34381
|
-
let single = options_.singleTilde
|
|
34367
|
+
const options_ = options || {};
|
|
34368
|
+
let single = options_.singleTilde;
|
|
34382
34369
|
const tokenizer = {
|
|
34370
|
+
name: 'strikethrough',
|
|
34383
34371
|
tokenize: tokenizeStrikethrough,
|
|
34384
34372
|
resolveAll: resolveAllStrikethrough
|
|
34385
|
-
}
|
|
34373
|
+
};
|
|
34386
34374
|
if (single === null || single === undefined) {
|
|
34387
|
-
single = true
|
|
34375
|
+
single = true;
|
|
34388
34376
|
}
|
|
34389
34377
|
return {
|
|
34390
34378
|
text: {
|
|
@@ -34396,7 +34384,7 @@ function gfmStrikethrough(options) {
|
|
|
34396
34384
|
attentionMarkers: {
|
|
34397
34385
|
null: [126]
|
|
34398
34386
|
}
|
|
34399
|
-
}
|
|
34387
|
+
};
|
|
34400
34388
|
|
|
34401
34389
|
/**
|
|
34402
34390
|
* Take events and resolve strikethrough.
|
|
@@ -34404,86 +34392,62 @@ function gfmStrikethrough(options) {
|
|
|
34404
34392
|
* @type {Resolver}
|
|
34405
34393
|
*/
|
|
34406
34394
|
function resolveAllStrikethrough(events, context) {
|
|
34407
|
-
let index = -1
|
|
34395
|
+
let index = -1;
|
|
34408
34396
|
|
|
34409
34397
|
// Walk through all events.
|
|
34410
34398
|
while (++index < events.length) {
|
|
34411
34399
|
// Find a token that can close.
|
|
34412
|
-
if (
|
|
34413
|
-
|
|
34414
|
-
events[index][1].type === 'strikethroughSequenceTemporary' &&
|
|
34415
|
-
events[index][1]._close
|
|
34416
|
-
) {
|
|
34417
|
-
let open = index
|
|
34400
|
+
if (events[index][0] === 'enter' && events[index][1].type === 'strikethroughSequenceTemporary' && events[index][1]._close) {
|
|
34401
|
+
let open = index;
|
|
34418
34402
|
|
|
34419
34403
|
// Now walk back to find an opener.
|
|
34420
34404
|
while (open--) {
|
|
34421
34405
|
// Find a token that can open the closer.
|
|
34422
|
-
if (
|
|
34423
|
-
|
|
34424
|
-
|
|
34425
|
-
events[
|
|
34426
|
-
|
|
34427
|
-
events[index][1].end.offset - events[index][1].start.offset ===
|
|
34428
|
-
events[open][1].end.offset - events[open][1].start.offset
|
|
34429
|
-
) {
|
|
34430
|
-
events[index][1].type = 'strikethroughSequence'
|
|
34431
|
-
events[open][1].type = 'strikethroughSequence'
|
|
34406
|
+
if (events[open][0] === 'exit' && events[open][1].type === 'strikethroughSequenceTemporary' && events[open][1]._open &&
|
|
34407
|
+
// If the sizes are the same:
|
|
34408
|
+
events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {
|
|
34409
|
+
events[index][1].type = 'strikethroughSequence';
|
|
34410
|
+
events[open][1].type = 'strikethroughSequence';
|
|
34432
34411
|
|
|
34433
34412
|
/** @type {Token} */
|
|
34434
34413
|
const strikethrough = {
|
|
34435
34414
|
type: 'strikethrough',
|
|
34436
34415
|
start: Object.assign({}, events[open][1].start),
|
|
34437
34416
|
end: Object.assign({}, events[index][1].end)
|
|
34438
|
-
}
|
|
34417
|
+
};
|
|
34439
34418
|
|
|
34440
34419
|
/** @type {Token} */
|
|
34441
34420
|
const text = {
|
|
34442
34421
|
type: 'strikethroughText',
|
|
34443
34422
|
start: Object.assign({}, events[open][1].end),
|
|
34444
34423
|
end: Object.assign({}, events[index][1].start)
|
|
34445
|
-
}
|
|
34424
|
+
};
|
|
34446
34425
|
|
|
34447
34426
|
// Opening.
|
|
34448
34427
|
/** @type {Array<Event>} */
|
|
34449
|
-
const nextEvents = [
|
|
34450
|
-
|
|
34451
|
-
['enter', events[open][1], context],
|
|
34452
|
-
['exit', events[open][1], context],
|
|
34453
|
-
['enter', text, context]
|
|
34454
|
-
]
|
|
34455
|
-
const insideSpan = context.parser.constructs.insideSpan.null
|
|
34428
|
+
const nextEvents = [['enter', strikethrough, context], ['enter', events[open][1], context], ['exit', events[open][1], context], ['enter', text, context]];
|
|
34429
|
+
const insideSpan = context.parser.constructs.insideSpan.null;
|
|
34456
34430
|
if (insideSpan) {
|
|
34457
34431
|
// Between.
|
|
34458
|
-
splice(
|
|
34459
|
-
nextEvents,
|
|
34460
|
-
nextEvents.length,
|
|
34461
|
-
0,
|
|
34462
|
-
resolveAll(insideSpan, events.slice(open + 1, index), context)
|
|
34463
|
-
)
|
|
34432
|
+
splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context));
|
|
34464
34433
|
}
|
|
34465
34434
|
|
|
34466
34435
|
// Closing.
|
|
34467
|
-
splice(nextEvents, nextEvents.length, 0, [
|
|
34468
|
-
|
|
34469
|
-
|
|
34470
|
-
|
|
34471
|
-
['exit', strikethrough, context]
|
|
34472
|
-
])
|
|
34473
|
-
splice(events, open - 1, index - open + 3, nextEvents)
|
|
34474
|
-
index = open + nextEvents.length - 2
|
|
34475
|
-
break
|
|
34436
|
+
splice(nextEvents, nextEvents.length, 0, [['exit', text, context], ['enter', events[index][1], context], ['exit', events[index][1], context], ['exit', strikethrough, context]]);
|
|
34437
|
+
splice(events, open - 1, index - open + 3, nextEvents);
|
|
34438
|
+
index = open + nextEvents.length - 2;
|
|
34439
|
+
break;
|
|
34476
34440
|
}
|
|
34477
34441
|
}
|
|
34478
34442
|
}
|
|
34479
34443
|
}
|
|
34480
|
-
index = -1
|
|
34444
|
+
index = -1;
|
|
34481
34445
|
while (++index < events.length) {
|
|
34482
34446
|
if (events[index][1].type === 'strikethroughSequenceTemporary') {
|
|
34483
|
-
events[index][1].type =
|
|
34447
|
+
events[index][1].type = "data";
|
|
34484
34448
|
}
|
|
34485
34449
|
}
|
|
34486
|
-
return events
|
|
34450
|
+
return events;
|
|
34487
34451
|
}
|
|
34488
34452
|
|
|
34489
34453
|
/**
|
|
@@ -34491,43 +34455,39 @@ function gfmStrikethrough(options) {
|
|
|
34491
34455
|
* @type {Tokenizer}
|
|
34492
34456
|
*/
|
|
34493
34457
|
function tokenizeStrikethrough(effects, ok, nok) {
|
|
34494
|
-
const previous = this.previous
|
|
34495
|
-
const events = this.events
|
|
34496
|
-
let size = 0
|
|
34497
|
-
return start
|
|
34458
|
+
const previous = this.previous;
|
|
34459
|
+
const events = this.events;
|
|
34460
|
+
let size = 0;
|
|
34461
|
+
return start;
|
|
34498
34462
|
|
|
34499
34463
|
/** @type {State} */
|
|
34500
34464
|
function start(code) {
|
|
34501
|
-
if (
|
|
34502
|
-
|
|
34503
|
-
events[events.length - 1][1].type !== 'characterEscape'
|
|
34504
|
-
) {
|
|
34505
|
-
return nok(code)
|
|
34465
|
+
if (previous === 126 && events[events.length - 1][1].type !== "characterEscape") {
|
|
34466
|
+
return nok(code);
|
|
34506
34467
|
}
|
|
34507
|
-
effects.enter('strikethroughSequenceTemporary')
|
|
34508
|
-
return more(code)
|
|
34468
|
+
effects.enter('strikethroughSequenceTemporary');
|
|
34469
|
+
return more(code);
|
|
34509
34470
|
}
|
|
34510
34471
|
|
|
34511
34472
|
/** @type {State} */
|
|
34512
34473
|
function more(code) {
|
|
34513
|
-
const before = classifyCharacter(previous)
|
|
34474
|
+
const before = classifyCharacter(previous);
|
|
34514
34475
|
if (code === 126) {
|
|
34515
34476
|
// If this is the third marker, exit.
|
|
34516
|
-
if (size > 1) return nok(code)
|
|
34517
|
-
effects.consume(code)
|
|
34518
|
-
size
|
|
34519
|
-
return more
|
|
34520
|
-
}
|
|
34521
|
-
if (size < 2 && !single) return nok(code)
|
|
34522
|
-
const token = effects.exit('strikethroughSequenceTemporary')
|
|
34523
|
-
const after = classifyCharacter(code)
|
|
34524
|
-
token._open = !after ||
|
|
34525
|
-
token._close = !before ||
|
|
34526
|
-
return ok(code)
|
|
34477
|
+
if (size > 1) return nok(code);
|
|
34478
|
+
effects.consume(code);
|
|
34479
|
+
size++;
|
|
34480
|
+
return more;
|
|
34481
|
+
}
|
|
34482
|
+
if (size < 2 && !single) return nok(code);
|
|
34483
|
+
const token = effects.exit('strikethroughSequenceTemporary');
|
|
34484
|
+
const after = classifyCharacter(code);
|
|
34485
|
+
token._open = !after || after === 2 && Boolean(before);
|
|
34486
|
+
token._close = !before || before === 2 && Boolean(after);
|
|
34487
|
+
return ok(code);
|
|
34527
34488
|
}
|
|
34528
34489
|
}
|
|
34529
34490
|
}
|
|
34530
|
-
|
|
34531
34491
|
;// ./node_modules/micromark-extension-gfm-table/lib/edit-map.js
|
|
34532
34492
|
/**
|
|
34533
34493
|
* @typedef {import('micromark-util-types').Event} Event
|
|
@@ -41068,6 +41028,7 @@ function remarkMdx(options) {
|
|
|
41068
41028
|
;// ./enums.ts
|
|
41069
41029
|
var NodeTypes;
|
|
41070
41030
|
(function (NodeTypes) {
|
|
41031
|
+
NodeTypes["anchor"] = "readme-anchor";
|
|
41071
41032
|
NodeTypes["callout"] = "rdme-callout";
|
|
41072
41033
|
NodeTypes["codeTabs"] = "code-tabs";
|
|
41073
41034
|
NodeTypes["embedBlock"] = "embed-block";
|
|
@@ -44027,7 +43988,7 @@ var EntityDecoderState;
|
|
|
44027
43988
|
EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
|
|
44028
43989
|
EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
|
|
44029
43990
|
})(EntityDecoderState || (EntityDecoderState = {}));
|
|
44030
|
-
var
|
|
43991
|
+
var decode_DecodingMode;
|
|
44031
43992
|
(function (DecodingMode) {
|
|
44032
43993
|
/** Entities in text nodes that can end with any character. */
|
|
44033
43994
|
DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
|
|
@@ -44035,7 +43996,7 @@ var DecodingMode;
|
|
|
44035
43996
|
DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
|
|
44036
43997
|
/** Entities in attributes have limitations on ending characters. */
|
|
44037
43998
|
DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
|
|
44038
|
-
})(
|
|
43999
|
+
})(decode_DecodingMode || (decode_DecodingMode = {}));
|
|
44039
44000
|
/**
|
|
44040
44001
|
* Token decoder with support of writing partial entities.
|
|
44041
44002
|
*/
|
|
@@ -44074,7 +44035,7 @@ class EntityDecoder {
|
|
|
44074
44035
|
/** The number of characters that were consumed in excess. */
|
|
44075
44036
|
this.excess = 1;
|
|
44076
44037
|
/** The mode in which the decoder is operating. */
|
|
44077
|
-
this.decodeMode =
|
|
44038
|
+
this.decodeMode = decode_DecodingMode.Strict;
|
|
44078
44039
|
}
|
|
44079
44040
|
/** Resets the instance to make it reusable. */
|
|
44080
44041
|
startEntity(decodeMode) {
|
|
@@ -44223,7 +44184,7 @@ class EntityDecoder {
|
|
|
44223
44184
|
if (lastCp === CharCodes.SEMI) {
|
|
44224
44185
|
this.consumed += 1;
|
|
44225
44186
|
}
|
|
44226
|
-
else if (this.decodeMode ===
|
|
44187
|
+
else if (this.decodeMode === decode_DecodingMode.Strict) {
|
|
44227
44188
|
return 0;
|
|
44228
44189
|
}
|
|
44229
44190
|
this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
|
|
@@ -44255,7 +44216,7 @@ class EntityDecoder {
|
|
|
44255
44216
|
if (this.treeIndex < 0) {
|
|
44256
44217
|
return this.result === 0 ||
|
|
44257
44218
|
// If we are parsing an attribute
|
|
44258
|
-
(this.decodeMode ===
|
|
44219
|
+
(this.decodeMode === decode_DecodingMode.Attribute &&
|
|
44259
44220
|
// We shouldn't have consumed any characters after the entity,
|
|
44260
44221
|
(valueLength === 0 ||
|
|
44261
44222
|
// And there should be no invalid characters.
|
|
@@ -44272,7 +44233,7 @@ class EntityDecoder {
|
|
|
44272
44233
|
return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
|
|
44273
44234
|
}
|
|
44274
44235
|
// If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
|
|
44275
|
-
if (this.decodeMode !==
|
|
44236
|
+
if (this.decodeMode !== decode_DecodingMode.Strict) {
|
|
44276
44237
|
this.result = this.treeIndex;
|
|
44277
44238
|
this.consumed += this.excess;
|
|
44278
44239
|
this.excess = 0;
|
|
@@ -44327,7 +44288,7 @@ class EntityDecoder {
|
|
|
44327
44288
|
case EntityDecoderState.NamedEntity: {
|
|
44328
44289
|
// Emit a named entity if we have one.
|
|
44329
44290
|
return this.result !== 0 &&
|
|
44330
|
-
(this.decodeMode !==
|
|
44291
|
+
(this.decodeMode !== decode_DecodingMode.Attribute ||
|
|
44331
44292
|
this.result === this.treeIndex)
|
|
44332
44293
|
? this.emitNotTerminatedNamedEntity()
|
|
44333
44294
|
: 0;
|
|
@@ -44434,7 +44395,7 @@ const xmlDecoder = getDecoder(decode_data_xml);
|
|
|
44434
44395
|
* @param mode The decoding mode.
|
|
44435
44396
|
* @returns The decoded string.
|
|
44436
44397
|
*/
|
|
44437
|
-
function
|
|
44398
|
+
function decode_decodeHTML(str, mode = decode_DecodingMode.Legacy) {
|
|
44438
44399
|
return htmlDecoder(str, mode);
|
|
44439
44400
|
}
|
|
44440
44401
|
/**
|
|
@@ -44444,7 +44405,7 @@ function decodeHTML(str, mode = DecodingMode.Legacy) {
|
|
|
44444
44405
|
* @returns The decoded string.
|
|
44445
44406
|
*/
|
|
44446
44407
|
function decodeHTMLAttribute(str) {
|
|
44447
|
-
return htmlDecoder(str,
|
|
44408
|
+
return htmlDecoder(str, decode_DecodingMode.Attribute);
|
|
44448
44409
|
}
|
|
44449
44410
|
/**
|
|
44450
44411
|
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
|
|
@@ -44453,7 +44414,7 @@ function decodeHTMLAttribute(str) {
|
|
|
44453
44414
|
* @returns The decoded string.
|
|
44454
44415
|
*/
|
|
44455
44416
|
function decodeHTMLStrict(str) {
|
|
44456
|
-
return htmlDecoder(str,
|
|
44417
|
+
return htmlDecoder(str, decode_DecodingMode.Strict);
|
|
44457
44418
|
}
|
|
44458
44419
|
/**
|
|
44459
44420
|
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
|
|
@@ -44461,8 +44422,8 @@ function decodeHTMLStrict(str) {
|
|
|
44461
44422
|
* @param str The string to decode.
|
|
44462
44423
|
* @returns The decoded string.
|
|
44463
44424
|
*/
|
|
44464
|
-
function
|
|
44465
|
-
return xmlDecoder(str,
|
|
44425
|
+
function decode_decodeXML(str) {
|
|
44426
|
+
return xmlDecoder(str, decode_DecodingMode.Strict);
|
|
44466
44427
|
}
|
|
44467
44428
|
//# sourceMappingURL=decode.js.map
|
|
44468
44429
|
;// ./node_modules/parse5/dist/common/html.js
|
|
@@ -52011,7 +51972,7 @@ function endTagInForeignContent(p, token) {
|
|
|
52011
51972
|
}
|
|
52012
51973
|
//# sourceMappingURL=index.js.map
|
|
52013
51974
|
;// ./node_modules/entities/lib/esm/escape.js
|
|
52014
|
-
const
|
|
51975
|
+
const escape_xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
|
|
52015
51976
|
const xmlCodeMap = new Map([
|
|
52016
51977
|
[34, """],
|
|
52017
51978
|
[38, "&"],
|
|
@@ -52020,7 +51981,7 @@ const xmlCodeMap = new Map([
|
|
|
52020
51981
|
[62, ">"],
|
|
52021
51982
|
]);
|
|
52022
51983
|
// For compatibility with node < 4, we wrap `codePointAt`
|
|
52023
|
-
const
|
|
51984
|
+
const escape_getCodePoint =
|
|
52024
51985
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
52025
51986
|
String.prototype.codePointAt != null
|
|
52026
51987
|
? (str, index) => str.codePointAt(index)
|
|
@@ -52038,11 +51999,11 @@ String.prototype.codePointAt != null
|
|
|
52038
51999
|
* If a character has no equivalent entity, a
|
|
52039
52000
|
* numeric hexadecimal reference (eg. `ü`) will be used.
|
|
52040
52001
|
*/
|
|
52041
|
-
function
|
|
52002
|
+
function escape_encodeXML(str) {
|
|
52042
52003
|
let ret = "";
|
|
52043
52004
|
let lastIdx = 0;
|
|
52044
52005
|
let match;
|
|
52045
|
-
while ((match =
|
|
52006
|
+
while ((match = escape_xmlReplacer.exec(str)) !== null) {
|
|
52046
52007
|
const i = match.index;
|
|
52047
52008
|
const char = str.charCodeAt(i);
|
|
52048
52009
|
const next = xmlCodeMap.get(char);
|
|
@@ -52051,9 +52012,9 @@ function encodeXML(str) {
|
|
|
52051
52012
|
lastIdx = i + 1;
|
|
52052
52013
|
}
|
|
52053
52014
|
else {
|
|
52054
|
-
ret += `${str.substring(lastIdx, i)}&#x${
|
|
52015
|
+
ret += `${str.substring(lastIdx, i)}&#x${escape_getCodePoint(str, i).toString(16)};`;
|
|
52055
52016
|
// Increase by 1 if we have a surrogate pair
|
|
52056
|
-
lastIdx =
|
|
52017
|
+
lastIdx = escape_xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);
|
|
52057
52018
|
}
|
|
52058
52019
|
}
|
|
52059
52020
|
return ret + str.substr(lastIdx);
|
|
@@ -52067,7 +52028,7 @@ function encodeXML(str) {
|
|
|
52067
52028
|
*
|
|
52068
52029
|
* @param data String to escape.
|
|
52069
52030
|
*/
|
|
52070
|
-
const escape_escape = (/* unused pure expression or super */ null && (
|
|
52031
|
+
const escape_escape = (/* unused pure expression or super */ null && (escape_encodeXML));
|
|
52071
52032
|
/**
|
|
52072
52033
|
* Creates a function that escapes all characters matched by the given regular
|
|
52073
52034
|
* expression using the given map of characters to escape to their entities.
|
|
@@ -52102,7 +52063,7 @@ function getEscaper(regex, map) {
|
|
|
52102
52063
|
*
|
|
52103
52064
|
* @param data String to escape.
|
|
52104
52065
|
*/
|
|
52105
|
-
const
|
|
52066
|
+
const escape_escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
|
|
52106
52067
|
/**
|
|
52107
52068
|
* Encodes all characters that have to be escaped in HTML attributes,
|
|
52108
52069
|
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
|
@@ -53081,6 +53042,13 @@ const extractText = (node) => {
|
|
|
53081
53042
|
|
|
53082
53043
|
|
|
53083
53044
|
|
|
53045
|
+
|
|
53046
|
+
|
|
53047
|
+
|
|
53048
|
+
|
|
53049
|
+
|
|
53050
|
+
const titleParser = unified().use(remarkParse).use(remarkGfm);
|
|
53051
|
+
const toMarkdownExtensions = [gfmStrikethroughToMarkdown()];
|
|
53084
53052
|
const callouts_regex = `^(${emoji_regex().source}|⚠)(\\s+|$)`;
|
|
53085
53053
|
const findFirst = (node) => {
|
|
53086
53054
|
if ('children' in node)
|
|
@@ -53197,31 +53165,65 @@ const processBlockquote = (node, index, parent) => {
|
|
|
53197
53165
|
// Example: "> ⚠️ **Bold heading**\nBody text here"
|
|
53198
53166
|
const bodyChildren = splitParagraphAtNewline(firstParagraph);
|
|
53199
53167
|
const didSplit = bodyChildren !== null;
|
|
53200
|
-
// Extract heading text after removing the icon prefix.
|
|
53201
|
-
// Use `plain()` to handle complex markdown structures (bold, inline code, etc.)
|
|
53202
|
-
const headingText = lib_plain(firstParagraph)
|
|
53203
|
-
.toString()
|
|
53204
|
-
.slice(match.length);
|
|
53205
|
-
// Clean up the raw AST by removing the icon prefix from the first text node
|
|
53206
53168
|
removeIconPrefix(firstParagraph, match.length);
|
|
53207
|
-
const
|
|
53169
|
+
const firstText = findFirst(firstParagraph);
|
|
53170
|
+
const rawValue = firstText?.value ?? '';
|
|
53171
|
+
const hasContent = rawValue.trim().length > 0 || firstParagraph.children.length > 1;
|
|
53172
|
+
const empty = !hasContent;
|
|
53208
53173
|
const theme = themes[icon] || 'default';
|
|
53209
|
-
|
|
53210
|
-
|
|
53211
|
-
|
|
53212
|
-
//
|
|
53213
|
-
|
|
53214
|
-
|
|
53174
|
+
if (hasContent || didSplit) {
|
|
53175
|
+
const headingMatch = rawValue.match(/^(#{1,6})\s*/);
|
|
53176
|
+
// # heading syntax is handled via direct AST manipulation so we can
|
|
53177
|
+
// set the depth while preserving the original inline children (bold, etc.)
|
|
53178
|
+
if (headingMatch) {
|
|
53179
|
+
firstText.value = rawValue.slice(headingMatch[0].length);
|
|
53180
|
+
const heading = wrapHeading(node);
|
|
53181
|
+
heading.depth = headingMatch[1].length;
|
|
53182
|
+
node.children[0] = heading;
|
|
53183
|
+
node.children[0].position.start.offset += match.length;
|
|
53184
|
+
node.children[0].position.start.column += match.length;
|
|
53185
|
+
}
|
|
53186
|
+
else {
|
|
53187
|
+
const headingText = toMarkdown({ type: 'root', children: [firstParagraph] }, {
|
|
53188
|
+
extensions: toMarkdownExtensions,
|
|
53189
|
+
})
|
|
53190
|
+
.trim()
|
|
53191
|
+
.replace(/^\\(?=[>#+\-*])/, '');
|
|
53192
|
+
const parsedTitle = titleParser.parse(headingText);
|
|
53193
|
+
const parsedFirstChild = parsedTitle.children[0];
|
|
53194
|
+
// Block-level syntax ("> quote", "- list") produces non-paragraph nodes;
|
|
53195
|
+
// inline text parses as a paragraph and falls through to wrapHeading().
|
|
53196
|
+
if (parsedFirstChild && parsedFirstChild.type !== 'paragraph') {
|
|
53197
|
+
// Strip positions from re-parsed nodes since they're relative to the heading text, not the original source
|
|
53198
|
+
visit(parsedTitle, (n) => {
|
|
53199
|
+
delete n.position;
|
|
53200
|
+
});
|
|
53201
|
+
const heading = wrapHeading(node);
|
|
53202
|
+
heading.children = parsedTitle.children;
|
|
53203
|
+
delete heading.position;
|
|
53204
|
+
node.children[0] = heading;
|
|
53205
|
+
}
|
|
53206
|
+
else {
|
|
53207
|
+
node.children[0] = wrapHeading(node);
|
|
53208
|
+
node.children[0].position.start.offset += match.length;
|
|
53209
|
+
node.children[0].position.start.column += match.length;
|
|
53210
|
+
}
|
|
53211
|
+
}
|
|
53215
53212
|
}
|
|
53216
53213
|
// Insert body content as a separate paragraph after the heading
|
|
53217
53214
|
if (bodyChildren) {
|
|
53215
|
+
const headingPosition = node.children[0].position;
|
|
53218
53216
|
node.children.splice(1, 0, {
|
|
53219
53217
|
type: 'paragraph',
|
|
53220
53218
|
children: bodyChildren,
|
|
53221
|
-
|
|
53222
|
-
|
|
53223
|
-
|
|
53224
|
-
|
|
53219
|
+
...(headingPosition && firstParagraphOriginalEnd
|
|
53220
|
+
? {
|
|
53221
|
+
position: {
|
|
53222
|
+
start: headingPosition.end,
|
|
53223
|
+
end: firstParagraphOriginalEnd,
|
|
53224
|
+
},
|
|
53225
|
+
}
|
|
53226
|
+
: {}),
|
|
53225
53227
|
});
|
|
53226
53228
|
}
|
|
53227
53229
|
Object.assign(node, {
|
|
@@ -53238,11 +53240,24 @@ const processBlockquote = (node, index, parent) => {
|
|
|
53238
53240
|
}
|
|
53239
53241
|
};
|
|
53240
53242
|
const calloutTransformer = () => {
|
|
53241
|
-
|
|
53242
|
-
visit(
|
|
53243
|
+
const processNode = (root) => {
|
|
53244
|
+
visit(root, 'blockquote', (node, index, parent) => {
|
|
53243
53245
|
processBlockquote(node, index, parent);
|
|
53246
|
+
if (node.type === NodeTypes.callout) {
|
|
53247
|
+
// SKIP prevents re-processing synthetic blockquotes in parsed title content
|
|
53248
|
+
// (e.g., blockquotes from "> Quote" titles). Recursively process body children
|
|
53249
|
+
// (index 1+, skipping the heading at 0) to handle nested callouts.
|
|
53250
|
+
for (let i = 1; i < node.children.length; i += 1) {
|
|
53251
|
+
processNode(node.children[i]);
|
|
53252
|
+
}
|
|
53253
|
+
return SKIP;
|
|
53254
|
+
}
|
|
53255
|
+
return undefined;
|
|
53244
53256
|
});
|
|
53245
53257
|
};
|
|
53258
|
+
return (tree) => {
|
|
53259
|
+
processNode(tree);
|
|
53260
|
+
};
|
|
53246
53261
|
};
|
|
53247
53262
|
/* harmony default export */ const callouts = (calloutTransformer);
|
|
53248
53263
|
|
|
@@ -53267,8 +53282,18 @@ const codeTabsTransformer = ({ copyButtons } = {}) => (tree) => {
|
|
|
53267
53282
|
const sibling = parent.children[walker];
|
|
53268
53283
|
if (!isCode(sibling))
|
|
53269
53284
|
break;
|
|
53285
|
+
// Check that the two code blocks are truly adjacent (no blank lines or
|
|
53286
|
+
// other content between them). The `gap` is the number of raw characters
|
|
53287
|
+
// between the end of the previous block and the start of this one.
|
|
53288
|
+
// For a LF-separated pair the gap equals `start.column` (the newline
|
|
53289
|
+
// char(s) plus any indentation). CRLF line endings add one extra byte
|
|
53290
|
+
// (\r) without advancing the line count, so we also accept
|
|
53291
|
+
// `start.column + 1` provided the blocks are still on consecutive lines.
|
|
53270
53292
|
const olderSibling = parent.children[walker - 1];
|
|
53271
|
-
|
|
53293
|
+
const gap = sibling.position.start.offset - olderSibling.position.end.offset;
|
|
53294
|
+
const lineDiff = sibling.position.start.line - olderSibling.position.end.line;
|
|
53295
|
+
const isCRLF = gap === sibling.position.start.column + 1 && lineDiff === 1;
|
|
53296
|
+
if (gap !== sibling.position.start.column && !isCRLF)
|
|
53272
53297
|
break;
|
|
53273
53298
|
children.push(sibling);
|
|
53274
53299
|
// eslint-disable-next-line no-plusplus
|
|
@@ -53359,7 +53384,7 @@ const divTransformer = () => tree => {
|
|
|
53359
53384
|
;// ./processor/transform/embeds.ts
|
|
53360
53385
|
|
|
53361
53386
|
|
|
53362
|
-
const isEmbed = (node) => 'title' in node && node.title === '@embed';
|
|
53387
|
+
const isEmbed = (node) => Boolean(node && 'title' in node && node.title === '@embed');
|
|
53363
53388
|
const embedTransformer = () => {
|
|
53364
53389
|
return (tree) => {
|
|
53365
53390
|
visit(tree, 'paragraph', (node, i, parent) => {
|
|
@@ -53367,7 +53392,7 @@ const embedTransformer = () => {
|
|
|
53367
53392
|
if (!isEmbed(child))
|
|
53368
53393
|
return;
|
|
53369
53394
|
const { url, title } = child;
|
|
53370
|
-
const label = child.children[0]
|
|
53395
|
+
const label = child.children[0]?.value;
|
|
53371
53396
|
const newNode = {
|
|
53372
53397
|
type: NodeTypes.embedBlock,
|
|
53373
53398
|
label,
|
|
@@ -70844,6 +70869,55 @@ const mdxToHast = () => tree => {
|
|
|
70844
70869
|
};
|
|
70845
70870
|
/* harmony default export */ const mdx_to_hast = (mdxToHast);
|
|
70846
70871
|
|
|
70872
|
+
;// ./lib/mdast-util/empty-task-list-item/index.ts
|
|
70873
|
+
/**
|
|
70874
|
+
* Normalizes list items that are written as only `[ ]` or `[x]` into GFM task
|
|
70875
|
+
* list items during parse, but only when at least one whitespace character
|
|
70876
|
+
* follows the closing bracket (`]`). This matches legacy behaviour for checkboxes
|
|
70877
|
+
*
|
|
70878
|
+
* The issue is `remark-gfm` does not actually classify these as task items when they have no content
|
|
70879
|
+
* after the checkbox, which leaves them as plain text (`"[ ]"`). So a custom extension is needed to
|
|
70880
|
+
* treat these as task items
|
|
70881
|
+
*/
|
|
70882
|
+
function exitListItemWithEmptyTaskListItem(token) {
|
|
70883
|
+
const node = this.stack[this.stack.length - 1];
|
|
70884
|
+
if (node &&
|
|
70885
|
+
node.type === 'listItem' &&
|
|
70886
|
+
typeof node.checked !== 'boolean') {
|
|
70887
|
+
const listItem = node;
|
|
70888
|
+
const head = listItem.children[0];
|
|
70889
|
+
if (head && head.type === 'paragraph' && head.children.length === 1) {
|
|
70890
|
+
const text = head.children[0];
|
|
70891
|
+
if (text.type === 'text') {
|
|
70892
|
+
const hasTrailingWhitespace = typeof head.position?.end.offset === 'number' &&
|
|
70893
|
+
typeof text.position?.end.offset === 'number' &&
|
|
70894
|
+
head.position.end.offset > text.position.end.offset;
|
|
70895
|
+
if (!hasTrailingWhitespace) {
|
|
70896
|
+
this.exit(token);
|
|
70897
|
+
return;
|
|
70898
|
+
}
|
|
70899
|
+
const value = text.value;
|
|
70900
|
+
if (value === '[ ]') {
|
|
70901
|
+
listItem.checked = false;
|
|
70902
|
+
head.children = [];
|
|
70903
|
+
}
|
|
70904
|
+
else if (value === '[x]' || value === '[X]') {
|
|
70905
|
+
listItem.checked = true;
|
|
70906
|
+
head.children = [];
|
|
70907
|
+
}
|
|
70908
|
+
}
|
|
70909
|
+
}
|
|
70910
|
+
}
|
|
70911
|
+
this.exit(token);
|
|
70912
|
+
}
|
|
70913
|
+
function emptyTaskListItemFromMarkdown() {
|
|
70914
|
+
return {
|
|
70915
|
+
exit: {
|
|
70916
|
+
listItem: exitListItemWithEmptyTaskListItem,
|
|
70917
|
+
},
|
|
70918
|
+
};
|
|
70919
|
+
}
|
|
70920
|
+
|
|
70847
70921
|
;// ./lib/mdast-util/legacy-variable/index.ts
|
|
70848
70922
|
|
|
70849
70923
|
const contextMap = new WeakMap();
|
|
@@ -71153,11 +71227,21 @@ function legacyVariable() {
|
|
|
71153
71227
|
*/
|
|
71154
71228
|
|
|
71155
71229
|
|
|
71230
|
+
;// ./processor/transform/mdxish/constants.ts
|
|
71231
|
+
/**
|
|
71232
|
+
* Inline component tags handled by mdxish-inline-components.ts.
|
|
71233
|
+
* Also excluded from block-level handling in mdxish-component-blocks.ts.
|
|
71234
|
+
*/
|
|
71235
|
+
const INLINE_COMPONENT_TAGS = new Set(['Anchor']);
|
|
71236
|
+
|
|
71156
71237
|
;// ./processor/transform/mdxish/mdxish-component-blocks.ts
|
|
71157
71238
|
|
|
71158
71239
|
|
|
71159
71240
|
|
|
71160
71241
|
|
|
71242
|
+
|
|
71243
|
+
|
|
71244
|
+
|
|
71161
71245
|
const pascalCaseTagPattern = /^<([A-Z][A-Za-z0-9_]*)([^>]*?)(\/?)>([\s\S]*)?$/;
|
|
71162
71246
|
const tagAttributePattern = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+))?/g;
|
|
71163
71247
|
/**
|
|
@@ -71170,14 +71254,13 @@ const MAX_LOOKAHEAD = 30;
|
|
|
71170
71254
|
* These components either have special parsing requirements that the generic component
|
|
71171
71255
|
* block transformer cannot handle correctly, or are inline components that we don't
|
|
71172
71256
|
* want to convert to mdxJsxFlowElement which is a block level element.
|
|
71173
|
-
*
|
|
71174
|
-
* Glossary and Anchor are inline components.
|
|
71175
71257
|
*/
|
|
71176
|
-
const EXCLUDED_TAGS = new Set(['HTMLBlock', 'Table', 'Glossary',
|
|
71258
|
+
const EXCLUDED_TAGS = new Set(['HTMLBlock', 'Table', 'Glossary', ...INLINE_COMPONENT_TAGS]);
|
|
71177
71259
|
const inlineMdProcessor = unified()
|
|
71178
71260
|
.data('micromarkExtensions', [legacyVariable()])
|
|
71179
|
-
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
71180
|
-
.use(remarkParse)
|
|
71261
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown()])
|
|
71262
|
+
.use(remarkParse)
|
|
71263
|
+
.use(remarkGfm);
|
|
71181
71264
|
const isClosingTag = (value, tag) => value.trim() === `</${tag}>`;
|
|
71182
71265
|
/**
|
|
71183
71266
|
* Parse markdown content into mdast children nodes.
|
|
@@ -71436,10 +71519,10 @@ const mdxishComponentBlocks = () => tree => {
|
|
|
71436
71519
|
const extraChildren = contentAfterTag ? parseMdChildren(contentAfterTag.trimStart()) : [];
|
|
71437
71520
|
// Collect all intermediate siblings between opening tag and closing tag
|
|
71438
71521
|
const intermediateChildren = parent.children.slice(index + 1, closingIndex);
|
|
71439
|
-
// For paragraph siblings, include the paragraph
|
|
71522
|
+
// For paragraph siblings, include the full paragraph (with closing tag stripped)
|
|
71440
71523
|
// For HTML siblings, include any content parsed from before the closing tag
|
|
71441
71524
|
const closingChildren = strippedParagraph
|
|
71442
|
-
? strippedParagraph.children
|
|
71525
|
+
? (strippedParagraph.children.length > 0 ? [strippedParagraph] : [])
|
|
71443
71526
|
: extraClosingChildren;
|
|
71444
71527
|
const componentNode = createComponentNode({
|
|
71445
71528
|
tag,
|
|
@@ -92101,6 +92184,46 @@ ${reformatHTML(html)}
|
|
|
92101
92184
|
};
|
|
92102
92185
|
/* harmony default export */ const html_block = (htmlBlock);
|
|
92103
92186
|
|
|
92187
|
+
;// ./processor/compile/list-item.ts
|
|
92188
|
+
|
|
92189
|
+
// Matches '*', '-', '+', '1.', '2.', '3.', etc. followed by a newline or 1-3 spaces
|
|
92190
|
+
// to be replaced with the marker and a space like `- [ ]`
|
|
92191
|
+
const listMarkerRegex = /^(?:[*+-]|\d+\.)(?:([\r\n]| {1,3})|$)/;
|
|
92192
|
+
/**
|
|
92193
|
+
* List-item serializer intended for checklist items
|
|
92194
|
+
* Uses the default listItem handler for formatting, then patches the output to inject the checkbox and preserve empty items
|
|
92195
|
+
*
|
|
92196
|
+
* The current aim is to ensure checklist items that have no text after the checkbox are serialized
|
|
92197
|
+
* with their checkbox intact (for example, `- [ ]`) instead of dropping it
|
|
92198
|
+
* We can add more adjustments if needed
|
|
92199
|
+
*/
|
|
92200
|
+
const compile_list_item_listItem = (node, parent, state, info) => {
|
|
92201
|
+
const head = node.children[0];
|
|
92202
|
+
const isCheckbox = typeof node.checked === 'boolean' && head && head.type === 'paragraph';
|
|
92203
|
+
if (!isCheckbox) {
|
|
92204
|
+
return handle.listItem(node, parent, state, info);
|
|
92205
|
+
}
|
|
92206
|
+
const checkbox = `[${node.checked ? 'x' : ' '}] `;
|
|
92207
|
+
// `tracker` keeps current column/offset for downstream line wrapping/indent
|
|
92208
|
+
// We move it by checkbox length so wrapped lines align after `[ ] ` / `[x] `
|
|
92209
|
+
const tracker = state.createTracker(info);
|
|
92210
|
+
tracker.move(checkbox);
|
|
92211
|
+
// Initialize the checkbox item with the default listItem serializer as the source of truth for spacing,
|
|
92212
|
+
// indentation, ordered marker formatting, and wrapping behavior
|
|
92213
|
+
let value = handle.listItem(node, parent, state, {
|
|
92214
|
+
...info,
|
|
92215
|
+
...tracker.current(),
|
|
92216
|
+
});
|
|
92217
|
+
// Patch and inject checkbox after the list marker token
|
|
92218
|
+
value = value.replace(listMarkerRegex, (match, separator) => {
|
|
92219
|
+
const marker = match.trim();
|
|
92220
|
+
const actualSeparator = separator || ' ';
|
|
92221
|
+
return `${marker}${actualSeparator}${checkbox}`;
|
|
92222
|
+
});
|
|
92223
|
+
return value;
|
|
92224
|
+
};
|
|
92225
|
+
/* harmony default export */ const list_item = (compile_list_item_listItem);
|
|
92226
|
+
|
|
92104
92227
|
;// ./processor/compile/plain.ts
|
|
92105
92228
|
const plain_plain = (node) => node.value;
|
|
92106
92229
|
/* harmony default export */ const compile_plain = (plain_plain);
|
|
@@ -92119,6 +92242,7 @@ const variable = (node) => `{user.${node.data?.hProperties?.name || ''}}`;
|
|
|
92119
92242
|
|
|
92120
92243
|
|
|
92121
92244
|
|
|
92245
|
+
|
|
92122
92246
|
function compilers(mdxish = false) {
|
|
92123
92247
|
const data = this.data();
|
|
92124
92248
|
const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);
|
|
@@ -92136,6 +92260,7 @@ function compilers(mdxish = false) {
|
|
|
92136
92260
|
figure: compile_compatibility,
|
|
92137
92261
|
html: compile_compatibility,
|
|
92138
92262
|
i: compile_compatibility,
|
|
92263
|
+
...(mdxish && { listItem: list_item }),
|
|
92139
92264
|
plain: compile_plain,
|
|
92140
92265
|
yaml: compile_compatibility,
|
|
92141
92266
|
};
|
|
@@ -93667,6 +93792,76 @@ function remarkBreaks() {
|
|
|
93667
93792
|
}
|
|
93668
93793
|
}
|
|
93669
93794
|
|
|
93795
|
+
;// ./processor/plugin/flatten-table-cell-paragraphs.ts
|
|
93796
|
+
|
|
93797
|
+
/** List elements that cause margin issues when adjacent to paragraphs */
|
|
93798
|
+
const LIST_ELEMENTS = new Set(['ul', 'ol']);
|
|
93799
|
+
/**
|
|
93800
|
+
* Check if a child is a whitespace-only text node
|
|
93801
|
+
*/
|
|
93802
|
+
function isWhitespaceText(child) {
|
|
93803
|
+
return child.type === 'text' && !child.value.trim();
|
|
93804
|
+
}
|
|
93805
|
+
/**
|
|
93806
|
+
* Check if a child is an element with the given tag name
|
|
93807
|
+
*/
|
|
93808
|
+
function isElementWithTag(child, tags) {
|
|
93809
|
+
return child.type === 'element' && tags.has(child.tagName);
|
|
93810
|
+
}
|
|
93811
|
+
/**
|
|
93812
|
+
* Rehype plugin that flattens paragraph elements that are adjacent to lists in table cells.
|
|
93813
|
+
*
|
|
93814
|
+
* When markdown content is parsed inside JSX table cells, text before/after lists
|
|
93815
|
+
* gets wrapped in `<p>` tags. This causes unwanted spacing because both `<p>` and
|
|
93816
|
+
* list elements have margins.
|
|
93817
|
+
*
|
|
93818
|
+
* This plugin selectively unwraps only `<p>` elements that are immediately before
|
|
93819
|
+
* or after a list (`<ul>` or `<ol>`), preserving paragraphs in other contexts.
|
|
93820
|
+
*/
|
|
93821
|
+
const rehypeFlattenTableCellParagraphs = () => {
|
|
93822
|
+
return (tree) => {
|
|
93823
|
+
visit(tree, 'element', (node) => {
|
|
93824
|
+
// Only process table cells
|
|
93825
|
+
if (node.tagName !== 'td' && node.tagName !== 'th')
|
|
93826
|
+
return;
|
|
93827
|
+
const children = node.children;
|
|
93828
|
+
const newChildren = [];
|
|
93829
|
+
for (let i = 0; i < children.length; i += 1) {
|
|
93830
|
+
const child = children[i];
|
|
93831
|
+
// If not a paragraph, keep as-is
|
|
93832
|
+
if (child.type !== 'element' || child.tagName !== 'p') {
|
|
93833
|
+
newChildren.push(child);
|
|
93834
|
+
}
|
|
93835
|
+
else {
|
|
93836
|
+
// Check if this paragraph is adjacent to a list
|
|
93837
|
+
// Look at previous non-whitespace sibling
|
|
93838
|
+
let prevIndex = i - 1;
|
|
93839
|
+
while (prevIndex >= 0 && isWhitespaceText(children[prevIndex])) {
|
|
93840
|
+
prevIndex -= 1;
|
|
93841
|
+
}
|
|
93842
|
+
const prevIsNewChild = newChildren.length > 0 && newChildren[newChildren.length - 1];
|
|
93843
|
+
const prevIsList = (prevIndex >= 0 && isElementWithTag(children[prevIndex], LIST_ELEMENTS)) ||
|
|
93844
|
+
(prevIsNewChild && prevIsNewChild.type === 'element' && LIST_ELEMENTS.has(prevIsNewChild.tagName));
|
|
93845
|
+
// Look at next non-whitespace sibling
|
|
93846
|
+
let nextIndex = i + 1;
|
|
93847
|
+
while (nextIndex < children.length && isWhitespaceText(children[nextIndex])) {
|
|
93848
|
+
nextIndex += 1;
|
|
93849
|
+
}
|
|
93850
|
+
const nextIsList = nextIndex < children.length && isElementWithTag(children[nextIndex], LIST_ELEMENTS);
|
|
93851
|
+
// If adjacent to a list, flatten the paragraph
|
|
93852
|
+
if (prevIsList || nextIsList) {
|
|
93853
|
+
newChildren.push(...child.children);
|
|
93854
|
+
}
|
|
93855
|
+
else {
|
|
93856
|
+
newChildren.push(child);
|
|
93857
|
+
}
|
|
93858
|
+
}
|
|
93859
|
+
}
|
|
93860
|
+
node.children = newChildren;
|
|
93861
|
+
});
|
|
93862
|
+
};
|
|
93863
|
+
};
|
|
93864
|
+
|
|
93670
93865
|
;// ./lib/utils/mdxish/mdxish-get-component-name.ts
|
|
93671
93866
|
/** Convert a string to PascalCase */
|
|
93672
93867
|
function toPascalCase(str) {
|
|
@@ -93705,7 +93900,7 @@ function getComponentName(componentName, components) {
|
|
|
93705
93900
|
|
|
93706
93901
|
|
|
93707
93902
|
|
|
93708
|
-
const
|
|
93903
|
+
const mdxish_components_INLINE_COMPONENT_TAGS = new Set(['anchor', 'glossary']);
|
|
93709
93904
|
function isElementContentNode(node) {
|
|
93710
93905
|
return node.type === 'element' || node.type === 'text' || node.type === 'comment';
|
|
93711
93906
|
}
|
|
@@ -93787,7 +93982,7 @@ function parseTextChildren(node, processMarkdown, components) {
|
|
|
93787
93982
|
const hast = processMarkdown(child.value.trim());
|
|
93788
93983
|
const children = (hast.children ?? []).filter(isElementContentNode);
|
|
93789
93984
|
// For inline components, preserve plain text instead of wrapping in <p>
|
|
93790
|
-
if (
|
|
93985
|
+
if (mdxish_components_INLINE_COMPONENT_TAGS.has(node.tagName.toLowerCase()) && isSingleParagraphTextNode(children)) {
|
|
93791
93986
|
return [child];
|
|
93792
93987
|
}
|
|
93793
93988
|
return children;
|
|
@@ -94160,20 +94355,35 @@ function extractBalancedBraces(content, start) {
|
|
|
94160
94355
|
return { content: content.slice(start, pos - 1), end: pos };
|
|
94161
94356
|
}
|
|
94162
94357
|
/**
|
|
94163
|
-
* Escapes
|
|
94164
|
-
* Handles
|
|
94358
|
+
* Escapes problematic braces in content to prevent MDX expression parsing errors.
|
|
94359
|
+
* Handles three cases:
|
|
94360
|
+
* 1. Unbalanced braces (e.g., `{foo` without closing `}`)
|
|
94361
|
+
* 2. Paragraph-spanning expressions (e.g., `{\n\n}` where blank line splits paragraphs)
|
|
94362
|
+
* 3. Skips HTML elements to prevent backslashes appearing in output
|
|
94363
|
+
*
|
|
94165
94364
|
*/
|
|
94166
|
-
function
|
|
94167
|
-
|
|
94168
|
-
|
|
94365
|
+
function escapeProblematicBraces(content) {
|
|
94366
|
+
// Skip HTML elements — their content should never be escaped because
|
|
94367
|
+
// rehypeRaw parses them into hast elements, making `\` literal text in output
|
|
94368
|
+
const htmlElements = [];
|
|
94369
|
+
const safe = content.replace(/<([a-z][a-zA-Z0-9]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g, match => {
|
|
94370
|
+
const idx = htmlElements.length;
|
|
94371
|
+
htmlElements.push(match);
|
|
94372
|
+
return `___HTML_ELEM_${idx}___`;
|
|
94373
|
+
});
|
|
94374
|
+
const toEscape = new Set();
|
|
94375
|
+
// Convert to array of Unicode code points to handle emojis and multi-byte characters correctly
|
|
94376
|
+
const chars = Array.from(safe);
|
|
94169
94377
|
let strDelim = null;
|
|
94170
94378
|
let strEscaped = false;
|
|
94171
|
-
//
|
|
94172
|
-
const
|
|
94379
|
+
// Stack of open braces with their state
|
|
94380
|
+
const openStack = [];
|
|
94381
|
+
// Track position of last newline (outside strings) to detect blank lines
|
|
94382
|
+
let lastNewlinePos = -2; // -2 means no recent newline
|
|
94173
94383
|
for (let i = 0; i < chars.length; i += 1) {
|
|
94174
94384
|
const ch = chars[i];
|
|
94175
|
-
// Track
|
|
94176
|
-
if (
|
|
94385
|
+
// Track string delimiters inside expressions to ignore braces within them
|
|
94386
|
+
if (openStack.length > 0) {
|
|
94177
94387
|
if (strDelim) {
|
|
94178
94388
|
if (strEscaped)
|
|
94179
94389
|
strEscaped = false;
|
|
@@ -94189,6 +94399,20 @@ function escapeUnbalancedBraces(content) {
|
|
|
94189
94399
|
// eslint-disable-next-line no-continue
|
|
94190
94400
|
continue;
|
|
94191
94401
|
}
|
|
94402
|
+
// Track newlines to detect blank lines (paragraph boundaries)
|
|
94403
|
+
if (ch === '\n') {
|
|
94404
|
+
// Check if this newline creates a blank line (only whitespace since last newline)
|
|
94405
|
+
if (lastNewlinePos >= 0) {
|
|
94406
|
+
const between = chars.slice(lastNewlinePos + 1, i).join('');
|
|
94407
|
+
if (/^[ \t]*$/.test(between)) {
|
|
94408
|
+
// This is a blank line - mark all open expressions as paragraph-spanning
|
|
94409
|
+
openStack.forEach(entry => {
|
|
94410
|
+
entry.hasBlankLine = true;
|
|
94411
|
+
});
|
|
94412
|
+
}
|
|
94413
|
+
}
|
|
94414
|
+
lastNewlinePos = i;
|
|
94415
|
+
}
|
|
94192
94416
|
}
|
|
94193
94417
|
// Skip already-escaped braces (count preceding backslashes)
|
|
94194
94418
|
if (ch === '{' || ch === '}') {
|
|
@@ -94200,21 +94424,37 @@ function escapeUnbalancedBraces(content) {
|
|
|
94200
94424
|
continue;
|
|
94201
94425
|
}
|
|
94202
94426
|
}
|
|
94203
|
-
if (ch === '{')
|
|
94204
|
-
|
|
94427
|
+
if (ch === '{') {
|
|
94428
|
+
openStack.push({ pos: i, hasBlankLine: false });
|
|
94429
|
+
lastNewlinePos = -2; // Reset newline tracking for new expression
|
|
94430
|
+
}
|
|
94205
94431
|
else if (ch === '}') {
|
|
94206
|
-
if (
|
|
94207
|
-
|
|
94208
|
-
|
|
94209
|
-
|
|
94432
|
+
if (openStack.length > 0) {
|
|
94433
|
+
const entry = openStack.pop();
|
|
94434
|
+
// If expression spans paragraph boundary, escape both braces
|
|
94435
|
+
if (entry.hasBlankLine) {
|
|
94436
|
+
toEscape.add(entry.pos);
|
|
94437
|
+
toEscape.add(i);
|
|
94438
|
+
}
|
|
94439
|
+
}
|
|
94440
|
+
else {
|
|
94441
|
+
// Unbalanced closing brace (no matching open)
|
|
94442
|
+
toEscape.add(i);
|
|
94443
|
+
}
|
|
94210
94444
|
}
|
|
94211
94445
|
}
|
|
94212
|
-
|
|
94213
|
-
|
|
94214
|
-
|
|
94215
|
-
|
|
94216
|
-
|
|
94217
|
-
|
|
94446
|
+
// Any remaining open braces are unbalanced
|
|
94447
|
+
openStack.forEach(entry => toEscape.add(entry.pos));
|
|
94448
|
+
// If there are no problematic braces, return safe content as-is;
|
|
94449
|
+
// otherwise, escape each problematic `{` or `}` so MDX doesn't treat them as expressions.
|
|
94450
|
+
let result = toEscape.size === 0
|
|
94451
|
+
? safe
|
|
94452
|
+
: chars.map((ch, i) => (toEscape.has(i) ? `\\${ch}` : ch)).join('');
|
|
94453
|
+
// Restore HTML elements
|
|
94454
|
+
if (htmlElements.length > 0) {
|
|
94455
|
+
result = result.replace(/___HTML_ELEM_(\d+)___/g, (_m, idx) => htmlElements[parseInt(idx, 10)]);
|
|
94456
|
+
}
|
|
94457
|
+
return result;
|
|
94218
94458
|
}
|
|
94219
94459
|
/**
|
|
94220
94460
|
* Converts JSX attribute expressions (attribute={expression}) to HTML attributes (attribute="value").
|
|
@@ -94308,8 +94548,9 @@ function preprocessJSXExpressions(content, context = {}) {
|
|
|
94308
94548
|
// For inline expressions, we use a library to parse the expression & evaluate it later
|
|
94309
94549
|
// For attribute expressions, it was difficult to use a library to parse them, so do it manually
|
|
94310
94550
|
processed = evaluateAttributeExpressions(protectedContent, context, protectedCode);
|
|
94311
|
-
// Step 3: Escape
|
|
94312
|
-
|
|
94551
|
+
// Step 3: Escape problematic braces to prevent MDX expression parsing errors
|
|
94552
|
+
// This handles both unbalanced braces and paragraph-spanning expressions in one pass
|
|
94553
|
+
processed = escapeProblematicBraces(processed);
|
|
94313
94554
|
// Step 4: Restore protected code blocks
|
|
94314
94555
|
processed = restoreCodeBlocks(processed, protectedCode);
|
|
94315
94556
|
return processed;
|
|
@@ -94406,6 +94647,9 @@ const generateSlugForHeadings = () => (tree) => {
|
|
|
94406
94647
|
};
|
|
94407
94648
|
/* harmony default export */ const heading_slugs = (generateSlugForHeadings);
|
|
94408
94649
|
|
|
94650
|
+
// EXTERNAL MODULE: external "@readme/variable"
|
|
94651
|
+
var variable_ = __webpack_require__(8167);
|
|
94652
|
+
var variable_default = /*#__PURE__*/__webpack_require__.n(variable_);
|
|
94409
94653
|
;// ./node_modules/rehype-parse/lib/index.js
|
|
94410
94654
|
/**
|
|
94411
94655
|
* @import {Root} from 'hast'
|
|
@@ -94471,6 +94715,311 @@ function rehypeParse(options) {
|
|
|
94471
94715
|
}
|
|
94472
94716
|
}
|
|
94473
94717
|
|
|
94718
|
+
;// ./node_modules/entities/lib/esm/generated/encode-html.js
|
|
94719
|
+
// Generated using scripts/write-encode-map.ts
|
|
94720
|
+
function restoreDiff(arr) {
|
|
94721
|
+
for (let i = 1; i < arr.length; i++) {
|
|
94722
|
+
arr[i][0] += arr[i - 1][0] + 1;
|
|
94723
|
+
}
|
|
94724
|
+
return arr;
|
|
94725
|
+
}
|
|
94726
|
+
// prettier-ignore
|
|
94727
|
+
/* 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"]])));
|
|
94728
|
+
//# sourceMappingURL=encode-html.js.map
|
|
94729
|
+
;// ./node_modules/entities/lib/esm/encode.js
|
|
94730
|
+
|
|
94731
|
+
|
|
94732
|
+
const htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
|
|
94733
|
+
/**
|
|
94734
|
+
* Encodes all characters in the input using HTML entities. This includes
|
|
94735
|
+
* characters that are valid ASCII characters in HTML documents, such as `#`.
|
|
94736
|
+
*
|
|
94737
|
+
* To get a more compact output, consider using the `encodeNonAsciiHTML`
|
|
94738
|
+
* function, which will only encode characters that are not valid in HTML
|
|
94739
|
+
* documents, as well as non-ASCII characters.
|
|
94740
|
+
*
|
|
94741
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
94742
|
+
* (eg. `ü`) will be used.
|
|
94743
|
+
*/
|
|
94744
|
+
function encode_encodeHTML(data) {
|
|
94745
|
+
return encodeHTMLTrieRe(htmlReplacer, data);
|
|
94746
|
+
}
|
|
94747
|
+
/**
|
|
94748
|
+
* Encodes all non-ASCII characters, as well as characters not valid in HTML
|
|
94749
|
+
* documents using HTML entities. This function will not encode characters that
|
|
94750
|
+
* are valid in HTML documents, such as `#`.
|
|
94751
|
+
*
|
|
94752
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
94753
|
+
* (eg. `ü`) will be used.
|
|
94754
|
+
*/
|
|
94755
|
+
function encode_encodeNonAsciiHTML(data) {
|
|
94756
|
+
return encodeHTMLTrieRe(xmlReplacer, data);
|
|
94757
|
+
}
|
|
94758
|
+
function encodeHTMLTrieRe(regExp, str) {
|
|
94759
|
+
let ret = "";
|
|
94760
|
+
let lastIdx = 0;
|
|
94761
|
+
let match;
|
|
94762
|
+
while ((match = regExp.exec(str)) !== null) {
|
|
94763
|
+
const i = match.index;
|
|
94764
|
+
ret += str.substring(lastIdx, i);
|
|
94765
|
+
const char = str.charCodeAt(i);
|
|
94766
|
+
let next = htmlTrie.get(char);
|
|
94767
|
+
if (typeof next === "object") {
|
|
94768
|
+
// We are in a branch. Try to match the next char.
|
|
94769
|
+
if (i + 1 < str.length) {
|
|
94770
|
+
const nextChar = str.charCodeAt(i + 1);
|
|
94771
|
+
const value = typeof next.n === "number"
|
|
94772
|
+
? next.n === nextChar
|
|
94773
|
+
? next.o
|
|
94774
|
+
: undefined
|
|
94775
|
+
: next.n.get(nextChar);
|
|
94776
|
+
if (value !== undefined) {
|
|
94777
|
+
ret += value;
|
|
94778
|
+
lastIdx = regExp.lastIndex += 1;
|
|
94779
|
+
continue;
|
|
94780
|
+
}
|
|
94781
|
+
}
|
|
94782
|
+
next = next.v;
|
|
94783
|
+
}
|
|
94784
|
+
// We might have a tree node without a value; skip and use a numeric entity.
|
|
94785
|
+
if (next !== undefined) {
|
|
94786
|
+
ret += next;
|
|
94787
|
+
lastIdx = i + 1;
|
|
94788
|
+
}
|
|
94789
|
+
else {
|
|
94790
|
+
const cp = getCodePoint(str, i);
|
|
94791
|
+
ret += `&#x${cp.toString(16)};`;
|
|
94792
|
+
// Increase by 1 if we have a surrogate pair
|
|
94793
|
+
lastIdx = regExp.lastIndex += Number(cp !== char);
|
|
94794
|
+
}
|
|
94795
|
+
}
|
|
94796
|
+
return ret + str.substr(lastIdx);
|
|
94797
|
+
}
|
|
94798
|
+
//# sourceMappingURL=encode.js.map
|
|
94799
|
+
;// ./node_modules/entities/lib/esm/index.js
|
|
94800
|
+
|
|
94801
|
+
|
|
94802
|
+
|
|
94803
|
+
/** The level of entities to support. */
|
|
94804
|
+
var EntityLevel;
|
|
94805
|
+
(function (EntityLevel) {
|
|
94806
|
+
/** Support only XML entities. */
|
|
94807
|
+
EntityLevel[EntityLevel["XML"] = 0] = "XML";
|
|
94808
|
+
/** Support HTML entities, which are a superset of XML entities. */
|
|
94809
|
+
EntityLevel[EntityLevel["HTML"] = 1] = "HTML";
|
|
94810
|
+
})(EntityLevel || (EntityLevel = {}));
|
|
94811
|
+
var EncodingMode;
|
|
94812
|
+
(function (EncodingMode) {
|
|
94813
|
+
/**
|
|
94814
|
+
* The output is UTF-8 encoded. Only characters that need escaping within
|
|
94815
|
+
* XML will be escaped.
|
|
94816
|
+
*/
|
|
94817
|
+
EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8";
|
|
94818
|
+
/**
|
|
94819
|
+
* The output consists only of ASCII characters. Characters that need
|
|
94820
|
+
* escaping within HTML, and characters that aren't ASCII characters will
|
|
94821
|
+
* be escaped.
|
|
94822
|
+
*/
|
|
94823
|
+
EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII";
|
|
94824
|
+
/**
|
|
94825
|
+
* Encode all characters that have an equivalent entity, as well as all
|
|
94826
|
+
* characters that are not ASCII characters.
|
|
94827
|
+
*/
|
|
94828
|
+
EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive";
|
|
94829
|
+
/**
|
|
94830
|
+
* Encode all characters that have to be escaped in HTML attributes,
|
|
94831
|
+
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
|
94832
|
+
*/
|
|
94833
|
+
EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute";
|
|
94834
|
+
/**
|
|
94835
|
+
* Encode all characters that have to be escaped in HTML text,
|
|
94836
|
+
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
|
|
94837
|
+
*/
|
|
94838
|
+
EncodingMode[EncodingMode["Text"] = 4] = "Text";
|
|
94839
|
+
})(EncodingMode || (EncodingMode = {}));
|
|
94840
|
+
/**
|
|
94841
|
+
* Decodes a string with entities.
|
|
94842
|
+
*
|
|
94843
|
+
* @param data String to decode.
|
|
94844
|
+
* @param options Decoding options.
|
|
94845
|
+
*/
|
|
94846
|
+
function esm_decode(data, options = EntityLevel.XML) {
|
|
94847
|
+
const level = typeof options === "number" ? options : options.level;
|
|
94848
|
+
if (level === EntityLevel.HTML) {
|
|
94849
|
+
const mode = typeof options === "object" ? options.mode : undefined;
|
|
94850
|
+
return decodeHTML(data, mode);
|
|
94851
|
+
}
|
|
94852
|
+
return decodeXML(data);
|
|
94853
|
+
}
|
|
94854
|
+
/**
|
|
94855
|
+
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
|
|
94856
|
+
*
|
|
94857
|
+
* @param data String to decode.
|
|
94858
|
+
* @param options Decoding options.
|
|
94859
|
+
* @deprecated Use `decode` with the `mode` set to `Strict`.
|
|
94860
|
+
*/
|
|
94861
|
+
function decodeStrict(data, options = EntityLevel.XML) {
|
|
94862
|
+
var _a;
|
|
94863
|
+
const opts = typeof options === "number" ? { level: options } : options;
|
|
94864
|
+
(_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict);
|
|
94865
|
+
return esm_decode(data, opts);
|
|
94866
|
+
}
|
|
94867
|
+
/**
|
|
94868
|
+
* Encodes a string with entities.
|
|
94869
|
+
*
|
|
94870
|
+
* @param data String to encode.
|
|
94871
|
+
* @param options Encoding options.
|
|
94872
|
+
*/
|
|
94873
|
+
function esm_encode(data, options = EntityLevel.XML) {
|
|
94874
|
+
const opts = typeof options === "number" ? { level: options } : options;
|
|
94875
|
+
// Mode `UTF8` just escapes XML entities
|
|
94876
|
+
if (opts.mode === EncodingMode.UTF8)
|
|
94877
|
+
return escapeUTF8(data);
|
|
94878
|
+
if (opts.mode === EncodingMode.Attribute)
|
|
94879
|
+
return escapeAttribute(data);
|
|
94880
|
+
if (opts.mode === EncodingMode.Text)
|
|
94881
|
+
return escapeText(data);
|
|
94882
|
+
if (opts.level === EntityLevel.HTML) {
|
|
94883
|
+
if (opts.mode === EncodingMode.ASCII) {
|
|
94884
|
+
return encodeNonAsciiHTML(data);
|
|
94885
|
+
}
|
|
94886
|
+
return encodeHTML(data);
|
|
94887
|
+
}
|
|
94888
|
+
// ASCII and Extensive are equivalent
|
|
94889
|
+
return encodeXML(data);
|
|
94890
|
+
}
|
|
94891
|
+
|
|
94892
|
+
|
|
94893
|
+
|
|
94894
|
+
//# sourceMappingURL=index.js.map
|
|
94895
|
+
;// ./lib/micromark/loose-html-entities/syntax.ts
|
|
94896
|
+
|
|
94897
|
+
|
|
94898
|
+
|
|
94899
|
+
const MAX_ENTITY_LENGTH = 32;
|
|
94900
|
+
const looseHtmlEntityConstruct = {
|
|
94901
|
+
name: 'looseHtmlEntity',
|
|
94902
|
+
tokenize: tokenizeLooseHtmlEntity,
|
|
94903
|
+
};
|
|
94904
|
+
function resolveEntity(name) {
|
|
94905
|
+
const input = `&${name};`;
|
|
94906
|
+
const decoded = decodeHTMLStrict(input);
|
|
94907
|
+
return decoded !== input ? decoded : undefined;
|
|
94908
|
+
}
|
|
94909
|
+
function tokenizeLooseHtmlEntity(effects, ok, nok) {
|
|
94910
|
+
let length = 0;
|
|
94911
|
+
const start = (code) => {
|
|
94912
|
+
if (code !== codes.ampersand)
|
|
94913
|
+
return nok(code);
|
|
94914
|
+
effects.enter('looseHtmlEntity');
|
|
94915
|
+
effects.consume(code);
|
|
94916
|
+
return afterAmpersand;
|
|
94917
|
+
};
|
|
94918
|
+
const afterAmpersand = (code) => {
|
|
94919
|
+
if (code === codes.numberSign) {
|
|
94920
|
+
effects.consume(code);
|
|
94921
|
+
return afterHash;
|
|
94922
|
+
}
|
|
94923
|
+
return accumulateNamed(code);
|
|
94924
|
+
};
|
|
94925
|
+
const afterHash = (code) => {
|
|
94926
|
+
if (code === codes.lowercaseX || code === codes.uppercaseX) {
|
|
94927
|
+
effects.consume(code);
|
|
94928
|
+
return accumulateHex;
|
|
94929
|
+
}
|
|
94930
|
+
return accumulateDecimal(code);
|
|
94931
|
+
};
|
|
94932
|
+
const accumulateNamed = (code) => {
|
|
94933
|
+
if (asciiAlphanumeric(code) && length < MAX_ENTITY_LENGTH) {
|
|
94934
|
+
effects.consume(code);
|
|
94935
|
+
length += 1;
|
|
94936
|
+
return accumulateNamed;
|
|
94937
|
+
}
|
|
94938
|
+
if (length === 0)
|
|
94939
|
+
return nok(code);
|
|
94940
|
+
if (code === codes.semicolon)
|
|
94941
|
+
return nok(code);
|
|
94942
|
+
effects.exit('looseHtmlEntity');
|
|
94943
|
+
return ok(code);
|
|
94944
|
+
};
|
|
94945
|
+
const accumulateDecimal = (code) => {
|
|
94946
|
+
if (asciiDigit(code) && length < MAX_ENTITY_LENGTH) {
|
|
94947
|
+
effects.consume(code);
|
|
94948
|
+
length += 1;
|
|
94949
|
+
return accumulateDecimal;
|
|
94950
|
+
}
|
|
94951
|
+
if (length === 0)
|
|
94952
|
+
return nok(code);
|
|
94953
|
+
if (code === codes.semicolon)
|
|
94954
|
+
return nok(code);
|
|
94955
|
+
effects.exit('looseHtmlEntity');
|
|
94956
|
+
return ok(code);
|
|
94957
|
+
};
|
|
94958
|
+
const accumulateHex = (code) => {
|
|
94959
|
+
if (asciiHexDigit(code) && length < MAX_ENTITY_LENGTH) {
|
|
94960
|
+
effects.consume(code);
|
|
94961
|
+
length += 1;
|
|
94962
|
+
return accumulateHex;
|
|
94963
|
+
}
|
|
94964
|
+
if (length === 0)
|
|
94965
|
+
return nok(code);
|
|
94966
|
+
if (code === codes.semicolon)
|
|
94967
|
+
return nok(code);
|
|
94968
|
+
effects.exit('looseHtmlEntity');
|
|
94969
|
+
return ok(code);
|
|
94970
|
+
};
|
|
94971
|
+
return start;
|
|
94972
|
+
}
|
|
94973
|
+
function exitLooseHtmlEntity(token) {
|
|
94974
|
+
const raw = this.sliceSerialize(token);
|
|
94975
|
+
const entityChars = raw.slice(1);
|
|
94976
|
+
if (entityChars.startsWith('#')) {
|
|
94977
|
+
const decoded = resolveEntity(entityChars);
|
|
94978
|
+
if (decoded) {
|
|
94979
|
+
this.enter({ type: 'text', value: decoded }, token);
|
|
94980
|
+
this.exit(token);
|
|
94981
|
+
return;
|
|
94982
|
+
}
|
|
94983
|
+
}
|
|
94984
|
+
else {
|
|
94985
|
+
for (let len = entityChars.length; len >= 2; len -= 1) {
|
|
94986
|
+
const candidate = entityChars.slice(0, len);
|
|
94987
|
+
const decoded = resolveEntity(candidate);
|
|
94988
|
+
if (decoded) {
|
|
94989
|
+
const remainder = entityChars.slice(len);
|
|
94990
|
+
this.enter({ type: 'text', value: decoded + remainder }, token);
|
|
94991
|
+
this.exit(token);
|
|
94992
|
+
return;
|
|
94993
|
+
}
|
|
94994
|
+
}
|
|
94995
|
+
}
|
|
94996
|
+
this.enter({ type: 'text', value: raw }, token);
|
|
94997
|
+
this.exit(token);
|
|
94998
|
+
}
|
|
94999
|
+
function looseHtmlEntity() {
|
|
95000
|
+
return {
|
|
95001
|
+
text: { [codes.ampersand]: looseHtmlEntityConstruct },
|
|
95002
|
+
};
|
|
95003
|
+
}
|
|
95004
|
+
function looseHtmlEntityFromMarkdown() {
|
|
95005
|
+
return {
|
|
95006
|
+
exit: {
|
|
95007
|
+
looseHtmlEntity: exitLooseHtmlEntity,
|
|
95008
|
+
},
|
|
95009
|
+
};
|
|
95010
|
+
}
|
|
95011
|
+
|
|
95012
|
+
;// ./lib/micromark/loose-html-entities/index.ts
|
|
95013
|
+
/**
|
|
95014
|
+
* Micromark extension for HTML entities without semicolons.
|
|
95015
|
+
*
|
|
95016
|
+
* Handles named entities (e.g. ` `, `&`, `©`), decimal numeric
|
|
95017
|
+
* references (e.g. ` `, `©`), and hex numeric references (e.g. ` `,
|
|
95018
|
+
* ` `). Entities that already include the semicolon are left for the
|
|
95019
|
+
* standard parser to handle.
|
|
95020
|
+
*/
|
|
95021
|
+
|
|
95022
|
+
|
|
94474
95023
|
;// ./processor/transform/mdxish/normalize-malformed-md-syntax.ts
|
|
94475
95024
|
|
|
94476
95025
|
// Marker patterns for multi-node emphasis detection
|
|
@@ -94887,6 +95436,11 @@ const EMPTY_CODE_PLACEHOLDER = {
|
|
|
94887
95436
|
|
|
94888
95437
|
|
|
94889
95438
|
|
|
95439
|
+
|
|
95440
|
+
|
|
95441
|
+
|
|
95442
|
+
|
|
95443
|
+
|
|
94890
95444
|
|
|
94891
95445
|
|
|
94892
95446
|
/**
|
|
@@ -94928,18 +95482,23 @@ const preprocessBody = (text) => {
|
|
|
94928
95482
|
};
|
|
94929
95483
|
/** Markdown parser */
|
|
94930
95484
|
const contentParser = unified()
|
|
94931
|
-
.data('micromarkExtensions', [legacyVariable()])
|
|
94932
|
-
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
95485
|
+
.data('micromarkExtensions', [legacyVariable(), looseHtmlEntity()])
|
|
95486
|
+
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown(), looseHtmlEntityFromMarkdown()])
|
|
94933
95487
|
.use(remarkParse)
|
|
94934
95488
|
.use(remarkBreaks)
|
|
94935
95489
|
.use(remarkGfm)
|
|
94936
95490
|
.use(normalize_malformed_md_syntax);
|
|
94937
|
-
/**
|
|
95491
|
+
/**
|
|
95492
|
+
* Markdown to HTML processor (mdast → hast → HTML string).
|
|
95493
|
+
*
|
|
95494
|
+
* Uses only strikethrough from GFM instead of the full remarkGfm bundle
|
|
95495
|
+
* since we've had a case where it was causing a stack overflow when parsing HTML blocks containing URLs
|
|
95496
|
+
* such as `<ul><li>https://a</li>\n</ul>` due to subtokenizing recursion for URLs
|
|
95497
|
+
*/
|
|
94938
95498
|
const markdownToHtml = unified()
|
|
94939
|
-
.data('micromarkExtensions', [legacyVariable()])
|
|
94940
|
-
.data('fromMarkdownExtensions', [legacyVariableFromMarkdown()])
|
|
95499
|
+
.data('micromarkExtensions', [gfmStrikethrough(), legacyVariable(), looseHtmlEntity()])
|
|
95500
|
+
.data('fromMarkdownExtensions', [gfmStrikethroughFromMarkdown(), legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown(), looseHtmlEntityFromMarkdown()])
|
|
94941
95501
|
.use(remarkParse)
|
|
94942
|
-
.use(remarkGfm)
|
|
94943
95502
|
.use(normalize_malformed_md_syntax)
|
|
94944
95503
|
.use(remarkRehype)
|
|
94945
95504
|
.use(rehypeStringify);
|
|
@@ -94951,7 +95510,12 @@ const htmlStringifier = unified().use(rehypeStringify);
|
|
|
94951
95510
|
const processBackslashEscapes = (text) => text.replace(/\\<([^>]*)>/g, '<$1>').replace(/\\([<>|])/g, (_, c) => (c === '<' ? '<' : c === '>' ? '>' : c));
|
|
94952
95511
|
/** Block-level HTML tags that trigger CommonMark type 6 HTML blocks (condition 6). */
|
|
94953
95512
|
const BLOCK_LEVEL_TAGS = new Set(htmlBlockNames);
|
|
94954
|
-
const escapeInvalidTags = (str) => str.replace(HTML_TAG_RE, (match, tag, rest) => {
|
|
95513
|
+
const escapeInvalidTags = (str) => str.replace(HTML_TAG_RE, (match, tag, rest, offset, input) => {
|
|
95514
|
+
// Don't escape legacy variable syntax like <<var>> since we want to parse it
|
|
95515
|
+
// with the tokenizer and not want the <var> to get parsed as an HTML tag
|
|
95516
|
+
const isLegacyVariable = offset > 0 && input[offset - 1] === '<' && offset < input.length - 1 && input[offset + match.length] === '>';
|
|
95517
|
+
if (isLegacyVariable)
|
|
95518
|
+
return match;
|
|
94955
95519
|
const tagName = tag.replace(/^\//, '');
|
|
94956
95520
|
if (STANDARD_HTML_TAGS.has(tagName.toLowerCase()))
|
|
94957
95521
|
return match;
|
|
@@ -94971,9 +95535,20 @@ const escapeInvalidTags = (str) => str.replace(HTML_TAG_RE, (match, tag, rest) =
|
|
|
94971
95535
|
* (it treats unknown tags as void elements, stripping their children).
|
|
94972
95536
|
*/
|
|
94973
95537
|
const processMarkdownInHtmlString = (html) => {
|
|
95538
|
+
let htmlContent = html;
|
|
95539
|
+
// Replace all occurrences of legacy variable syntax like <<name>> with placeholders so the inner
|
|
95540
|
+
// <name> doesn't get parsed as an HTML tag and the tokenizer can parse it
|
|
95541
|
+
const legacyVars = {};
|
|
95542
|
+
let legacyCounter = 0;
|
|
95543
|
+
htmlContent = htmlContent.replace(new RegExp(variable_.VARIABLE_REGEXP, 'g'), match => {
|
|
95544
|
+
const id = `RDMX_LEGACY_VAR_${(legacyCounter += 1)}_TOKEN`;
|
|
95545
|
+
legacyVars[id] = match;
|
|
95546
|
+
return id;
|
|
95547
|
+
});
|
|
94974
95548
|
const placeholders = [];
|
|
94975
95549
|
let counter = 0;
|
|
94976
|
-
|
|
95550
|
+
// Escape invalid html tags so they don't get parsed as HTML tags
|
|
95551
|
+
const safened = escapeInvalidTags(htmlContent).replace(HTML_TAG_RE, match => {
|
|
94977
95552
|
if (!/^<\/?[A-Z]/.test(match))
|
|
94978
95553
|
return match;
|
|
94979
95554
|
const id = `<!--PC${(counter += 1)}-->`;
|
|
@@ -94984,7 +95559,10 @@ const processMarkdownInHtmlString = (html) => {
|
|
|
94984
95559
|
const textToHast = (text) => {
|
|
94985
95560
|
if (!text.trim())
|
|
94986
95561
|
return [{ type: 'text', value: text }];
|
|
94987
|
-
|
|
95562
|
+
// Restore legacy variables
|
|
95563
|
+
const restoredText = Object.entries(legacyVars).reduce((res, [id, original]) => res.replace(id, original), text);
|
|
95564
|
+
// Cell children might have html that needs to be parsed as markdown
|
|
95565
|
+
const parsed = markdownToHtml.runSync(markdownToHtml.parse(escapeInvalidTags(restoredText)));
|
|
94988
95566
|
const nodes = parsed.children.flatMap(n => n.type === 'element' && n.tagName === 'p' ? n.children : [n]);
|
|
94989
95567
|
const leading = text.match(/^\s+/)?.[0];
|
|
94990
95568
|
const trailing = text.match(/\s+$/)?.[0];
|
|
@@ -95737,10 +96315,82 @@ const mdxishHtmlBlocks = () => tree => {
|
|
|
95737
96315
|
};
|
|
95738
96316
|
/* harmony default export */ const mdxish_html_blocks = (mdxishHtmlBlocks);
|
|
95739
96317
|
|
|
96318
|
+
;// ./processor/transform/mdxish/mdxish-inline-components.ts
|
|
96319
|
+
|
|
96320
|
+
|
|
96321
|
+
|
|
96322
|
+
// Matches any PascalCase inline component opening tag. Groups: (name, attrs).
|
|
96323
|
+
// Uses [A-Za-z0-9_]* to match block version in mdxish-component-blocks.ts
|
|
96324
|
+
const INLINE_COMPONENT_OPEN_RE = /^<([A-Z][A-Za-z0-9_]*)(\s[^>]*)?>$/;
|
|
96325
|
+
function toMdxJsxTextElement(name, attributes, children) {
|
|
96326
|
+
return {
|
|
96327
|
+
type: 'mdxJsxTextElement',
|
|
96328
|
+
name,
|
|
96329
|
+
attributes,
|
|
96330
|
+
children,
|
|
96331
|
+
};
|
|
96332
|
+
}
|
|
96333
|
+
/**
|
|
96334
|
+
* Transforms inline html component nodes (e.g. <Anchor>) into proper MDAST phrasing content.
|
|
96335
|
+
*
|
|
96336
|
+
* Inline components are excluded from mdxishComponentBlocks (which only handles block-level
|
|
96337
|
+
* elements), so they remain as scattered html/text/html sibling nodes inside a paragraph.
|
|
96338
|
+
* This plugin merges them into a single typed MDAST node.
|
|
96339
|
+
*/
|
|
96340
|
+
const mdxishInlineComponents = () => tree => {
|
|
96341
|
+
visit(tree, 'html', (node, index, parent) => {
|
|
96342
|
+
if (!parent || index === undefined)
|
|
96343
|
+
return;
|
|
96344
|
+
const match = node.value?.match(INLINE_COMPONENT_OPEN_RE);
|
|
96345
|
+
if (!match)
|
|
96346
|
+
return;
|
|
96347
|
+
const [, name, attrStr] = match;
|
|
96348
|
+
if (!INLINE_COMPONENT_TAGS.has(name))
|
|
96349
|
+
return;
|
|
96350
|
+
// Parse attributes directly - preserves all attribute types (strings, booleans, objects, arrays)
|
|
96351
|
+
const attributes = parseAttributes(attrStr ?? '');
|
|
96352
|
+
// Find closing tag with whitespace-tolerant matching
|
|
96353
|
+
let closeIdx = index + 1;
|
|
96354
|
+
while (closeIdx < parent.children.length) {
|
|
96355
|
+
const sib = parent.children[closeIdx];
|
|
96356
|
+
if (sib.type === 'html' && sib.value?.trim() === `</${name}>`)
|
|
96357
|
+
break;
|
|
96358
|
+
closeIdx += 1;
|
|
96359
|
+
}
|
|
96360
|
+
if (closeIdx >= parent.children.length)
|
|
96361
|
+
return;
|
|
96362
|
+
// Extract all nodes between opening tag (index) and closing tag (closeIdx).
|
|
96363
|
+
// These are the inline component's children (e.g., text, emphasis, links).
|
|
96364
|
+
// Example: "<Anchor>click **here**</Anchor>" → children = [text, strong]
|
|
96365
|
+
const children = parent.children.slice(index + 1, closeIdx);
|
|
96366
|
+
const newNode = toMdxJsxTextElement(name, attributes, children);
|
|
96367
|
+
parent.children.splice(index, closeIdx - index + 1, newNode);
|
|
96368
|
+
});
|
|
96369
|
+
};
|
|
96370
|
+
/* harmony default export */ const mdxish_inline_components = (mdxishInlineComponents);
|
|
96371
|
+
|
|
95740
96372
|
;// ./processor/transform/mdxish/mdxish-jsx-to-mdast.ts
|
|
95741
96373
|
|
|
95742
96374
|
|
|
95743
96375
|
|
|
96376
|
+
const transformAnchor = (jsx) => {
|
|
96377
|
+
const attrs = getAttrs(jsx);
|
|
96378
|
+
const { href = '', label, target, title } = attrs;
|
|
96379
|
+
return {
|
|
96380
|
+
type: NodeTypes.anchor,
|
|
96381
|
+
children: jsx.children,
|
|
96382
|
+
data: {
|
|
96383
|
+
hName: 'Anchor',
|
|
96384
|
+
hProperties: {
|
|
96385
|
+
href,
|
|
96386
|
+
...(label && { label }),
|
|
96387
|
+
...(target && { target }),
|
|
96388
|
+
...(title && { title }),
|
|
96389
|
+
},
|
|
96390
|
+
},
|
|
96391
|
+
position: jsx.position,
|
|
96392
|
+
};
|
|
96393
|
+
};
|
|
95744
96394
|
const transformImage = (jsx) => {
|
|
95745
96395
|
const attrs = getAttrs(jsx);
|
|
95746
96396
|
const { align, alt = '', border, caption, className, height, lazy, src = '', title = '', width } = attrs;
|
|
@@ -95794,7 +96444,7 @@ const transformCallout = (jsx) => {
|
|
|
95794
96444
|
};
|
|
95795
96445
|
const transformEmbed = (jsx) => {
|
|
95796
96446
|
const attrs = getAttrs(jsx);
|
|
95797
|
-
const { favicon, html, iframe, image, providerName, providerUrl, title = '', url = '' } = attrs;
|
|
96447
|
+
const { favicon, height, html, iframe, image, providerName, providerUrl, title = '', typeOfEmbed, url = '', width } = attrs;
|
|
95798
96448
|
return {
|
|
95799
96449
|
type: NodeTypes.embedBlock,
|
|
95800
96450
|
title,
|
|
@@ -95805,11 +96455,14 @@ const transformEmbed = (jsx) => {
|
|
|
95805
96455
|
title,
|
|
95806
96456
|
url,
|
|
95807
96457
|
...(favicon && { favicon }),
|
|
96458
|
+
...(height && { height }),
|
|
95808
96459
|
...(html && { html }),
|
|
95809
96460
|
...(iframe !== undefined && { iframe }),
|
|
95810
96461
|
...(image && { image }),
|
|
95811
96462
|
...(providerName && { providerName }),
|
|
95812
96463
|
...(providerUrl && { providerUrl }),
|
|
96464
|
+
...(typeOfEmbed && { typeOfEmbed }),
|
|
96465
|
+
...(width && { width }),
|
|
95813
96466
|
},
|
|
95814
96467
|
},
|
|
95815
96468
|
position: jsx.position,
|
|
@@ -95905,7 +96558,7 @@ const COMPONENT_MAP = {
|
|
|
95905
96558
|
* This is controlled by the `newEditorTypes` flag to maintain backwards compatibility.
|
|
95906
96559
|
*/
|
|
95907
96560
|
const mdxishJsxToMdast = () => tree => {
|
|
95908
|
-
//
|
|
96561
|
+
// Block JSX components (Image, Callout, Embed, Recipe)
|
|
95909
96562
|
visit(tree, 'mdxJsxFlowElement', (node, index, parent) => {
|
|
95910
96563
|
if (!parent || index === undefined || !node.name)
|
|
95911
96564
|
return;
|
|
@@ -95916,6 +96569,15 @@ const mdxishJsxToMdast = () => tree => {
|
|
|
95916
96569
|
// Replace the JSX node with the MDAST node
|
|
95917
96570
|
parent.children[index] = newNode;
|
|
95918
96571
|
});
|
|
96572
|
+
// Inline JSX components (Anchor)
|
|
96573
|
+
visit(tree, 'mdxJsxTextElement', (node, index, parent) => {
|
|
96574
|
+
if (!parent || index === undefined || !node.name)
|
|
96575
|
+
return;
|
|
96576
|
+
if (node.name === 'Anchor') {
|
|
96577
|
+
const newNode = transformAnchor(node);
|
|
96578
|
+
parent.children[index] = newNode;
|
|
96579
|
+
}
|
|
96580
|
+
});
|
|
95919
96581
|
// Transform magic block images (type: 'image') to image-block
|
|
95920
96582
|
// Note: Standard markdown images are wrapped in paragraphs and handled by imageTransformer
|
|
95921
96583
|
// Magic block images are direct children of root, so we handle them here
|
|
@@ -96277,9 +96939,6 @@ function terminateHtmlFlowBlocks(content) {
|
|
|
96277
96939
|
return restoreCodeBlocks(result.join('\n'), protectedCode);
|
|
96278
96940
|
}
|
|
96279
96941
|
|
|
96280
|
-
// EXTERNAL MODULE: external "@readme/variable"
|
|
96281
|
-
var variable_ = __webpack_require__(8167);
|
|
96282
|
-
var variable_default = /*#__PURE__*/__webpack_require__.n(variable_);
|
|
96283
96942
|
;// ./processor/transform/mdxish/variables-code.ts
|
|
96284
96943
|
|
|
96285
96944
|
|
|
@@ -97506,6 +98165,10 @@ function loadComponents() {
|
|
|
97506
98165
|
|
|
97507
98166
|
|
|
97508
98167
|
|
|
98168
|
+
|
|
98169
|
+
|
|
98170
|
+
|
|
98171
|
+
|
|
97509
98172
|
|
|
97510
98173
|
|
|
97511
98174
|
|
|
@@ -97554,10 +98217,12 @@ function mdxishAstProcessor(mdContent, opts = {}) {
|
|
|
97554
98217
|
text: mdxExprExt.text,
|
|
97555
98218
|
};
|
|
97556
98219
|
const processor = unified()
|
|
97557
|
-
.data('micromarkExtensions', safeMode
|
|
98220
|
+
.data('micromarkExtensions', safeMode
|
|
98221
|
+
? [magicBlock(), legacyVariable(), looseHtmlEntity()]
|
|
98222
|
+
: [magicBlock(), mdxExprTextOnly, legacyVariable(), looseHtmlEntity()])
|
|
97558
98223
|
.data('fromMarkdownExtensions', safeMode
|
|
97559
|
-
? [magicBlockFromMarkdown(), legacyVariableFromMarkdown()]
|
|
97560
|
-
: [magicBlockFromMarkdown(), mdxExpressionFromMarkdown(), legacyVariableFromMarkdown()])
|
|
98224
|
+
? [magicBlockFromMarkdown(), legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown(), looseHtmlEntityFromMarkdown()]
|
|
98225
|
+
: [magicBlockFromMarkdown(), mdxExpressionFromMarkdown(), legacyVariableFromMarkdown(), emptyTaskListItemFromMarkdown(), looseHtmlEntityFromMarkdown()])
|
|
97561
98226
|
.use(remarkParse)
|
|
97562
98227
|
.use(remarkFrontmatter)
|
|
97563
98228
|
.use(normalize_malformed_md_syntax)
|
|
@@ -97568,7 +98233,9 @@ function mdxishAstProcessor(mdContent, opts = {}) {
|
|
|
97568
98233
|
.use(restore_snake_case_component_name, { mapping: snakeCaseMapping })
|
|
97569
98234
|
.use(mdxish_tables)
|
|
97570
98235
|
.use(mdxish_html_blocks)
|
|
97571
|
-
.use(newEditorTypes ?
|
|
98236
|
+
.use(newEditorTypes ? mdxish_inline_components : undefined) // Merge inline html components (e.g. <Anchor>) into MDAST nodes
|
|
98237
|
+
.use(newEditorTypes ? mdxish_jsx_to_mdast : undefined) // Convert block JSX elements to MDAST types
|
|
98238
|
+
.use(safeMode ? undefined : evaluate_expressions, { context: jsxContext }) // Evaluate MDX expressions using jsxContext
|
|
97572
98239
|
.use(variables_text) // Parse {user.*} patterns from text nodes
|
|
97573
98240
|
.use(useTailwind ? transform_tailwind : undefined, { components: tempComponentsMap })
|
|
97574
98241
|
.use(remarkGfm);
|
|
@@ -97621,6 +98288,7 @@ function mdxish(mdContent, opts = {}) {
|
|
|
97621
98288
|
.use(preserveBooleanProperties) // RehypeRaw converts boolean properties to empty strings
|
|
97622
98289
|
.use(rehypeRaw, { passThrough: ['html-block'] })
|
|
97623
98290
|
.use(restoreBooleanProperties)
|
|
98291
|
+
.use(rehypeFlattenTableCellParagraphs) // Remove <p> wrappers inside table cells to prevent margin issues
|
|
97624
98292
|
.use(mdxish_mermaid) // Add mermaid-render className to pre wrappers
|
|
97625
98293
|
.use(heading_slugs)
|
|
97626
98294
|
.use(rehypeMdxishComponents, {
|