@meowdown/markdown 0.64.0 → 0.64.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -1
- package/dist/index.js +9 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,9 @@ interface InlineElement {
|
|
|
34
34
|
* marked `@internal`).
|
|
35
35
|
*/
|
|
36
36
|
declare function parseInline(text: string): readonly InlineElement[];
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Depth-first list of every element matching `test`.
|
|
39
|
+
*/
|
|
38
40
|
declare function collectInlineElements(nodes: readonly InlineElement[], test: (node: InlineElement) => boolean, out?: InlineElement[]): InlineElement[];
|
|
39
41
|
//#endregion
|
|
40
42
|
//#region src/node-names.d.ts
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,9 @@ const BARE_AUTOLINK_TLDS = /* @__PURE__ */ new Set([
|
|
|
20
20
|
"fr"
|
|
21
21
|
]);
|
|
22
22
|
const DNS_LABEL_RE = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i;
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The host portion of a bare candidate: everything before the first `/`.
|
|
25
|
+
*/
|
|
24
26
|
function hostFromUrl(text) {
|
|
25
27
|
const slash = text.indexOf("/");
|
|
26
28
|
return slash === -1 ? text : text.slice(0, slash);
|
|
@@ -208,7 +210,9 @@ const highlight = {
|
|
|
208
210
|
function isDigit(code) {
|
|
209
211
|
return code >= 48 && code <= 57;
|
|
210
212
|
}
|
|
211
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* A line whose content is exactly `$$`, allowing trailing whitespace.
|
|
215
|
+
*/
|
|
212
216
|
function isBlockMathFence(line) {
|
|
213
217
|
if (line.next !== 36) return false;
|
|
214
218
|
if (line.text.charCodeAt(line.pos + 1) !== 36) return false;
|
|
@@ -457,7 +461,9 @@ const gfmBlockOnlyParser = gfmParser.configure({ parseInline: [{
|
|
|
457
461
|
function parseInline(text) {
|
|
458
462
|
return gfmParser.parseInline(text, 0);
|
|
459
463
|
}
|
|
460
|
-
/**
|
|
464
|
+
/**
|
|
465
|
+
* Depth-first list of every element matching `test`.
|
|
466
|
+
*/
|
|
461
467
|
function collectInlineElements(nodes, test, out = []) {
|
|
462
468
|
for (const node of nodes) {
|
|
463
469
|
if (test(node)) out.push(node);
|