@readme/markdown 14.13.2 → 14.14.1
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 +1 -1
- package/dist/lib/constants.d.ts +4 -2
- package/dist/lib/htmlToMarkdown.d.ts +5 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/micromark/mdx-component/syntax.d.ts +4 -2
- package/dist/lib/micromark/mdxish-extensions.d.ts +140 -0
- package/dist/lib/utils/jsx-acorn-parser.d.ts +10 -0
- package/dist/main.js +27440 -27381
- package/dist/main.node.js +27415 -27356
- package/dist/main.node.js.map +1 -1
- package/dist/processor/transform/mdxish/collapse-foreign-content-blank-lines.d.ts +2 -1
- package/dist/processor/transform/mdxish/components/utils.d.ts +7 -0
- package/dist/processor/transform/mdxish/indentation.d.ts +4 -5
- package/dist/processor/utils.d.ts +2 -6
- package/dist/render-fixture.node.js +26274 -26216
- package/dist/render-fixture.node.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +15 -5
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Drop blank lines inside `<svg>`/`<math>` islands: their whitespace is
|
|
3
3
|
* insignificant XML, but a blank line ends the CommonMark HTML block and spills the
|
|
4
|
-
* children out
|
|
4
|
+
* children out of the island, where parse5 drops the orphaned foreign tags (#1545).
|
|
5
|
+
* Collapsing keeps the island one block.
|
|
5
6
|
*/
|
|
6
7
|
export declare function collapseForeignContentBlankLines(content: string): string;
|
|
@@ -10,6 +10,13 @@ export type MdxAttributes = (MdxJsxAttribute | MdxJsxExpressionAttribute)[];
|
|
|
10
10
|
export declare const getInlineMdProcessor: ({ safeMode }?: {
|
|
11
11
|
safeMode?: boolean;
|
|
12
12
|
}) => import("unified").Processor<import("mdast").Root, undefined, undefined, undefined, undefined>;
|
|
13
|
+
/**
|
|
14
|
+
* Mark re-parsed subtree roots with the string their positions index into, so consumers
|
|
15
|
+
* slicing by offset use the right source (see `Data.reparseSource`). Only roots are
|
|
16
|
+
* stamped; descendants resolve via their nearest stamped ancestor. Roots a deeper
|
|
17
|
+
* re-parse already stamped keep their own string.
|
|
18
|
+
*/
|
|
19
|
+
export declare const stampReparseSource: (roots: Node[], reparseSource: string) => void;
|
|
13
20
|
/**
|
|
14
21
|
* True when a tag name starts with an uppercase letter — ReadMe's marker for
|
|
15
22
|
* a custom MDX component (vs a lowercase HTML tag).
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* CommonMark indentation helpers, shared by the mdxish preprocessors so tab- and
|
|
3
3
|
* space-indented content is measured (and sliced) on one scale.
|
|
4
4
|
*
|
|
5
|
-
* CommonMark
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* from drifting on what "4 columns" means.
|
|
5
|
+
* CommonMark measures indentation in *columns*, and a tab is a 4-column tab stop — not a
|
|
6
|
+
* fixed 4 characters. Counting characters (tab = 1) under-measures tab-indented lines, so
|
|
7
|
+
* column-anchored decisions (body dedenting, HTML-flow termination) would drift from how
|
|
8
|
+
* micromark reads the same lines.
|
|
10
9
|
*/
|
|
11
10
|
/** The run of leading spaces/tabs on a line. */
|
|
12
11
|
export declare const leadingIndent: (line: string) => string;
|
|
@@ -3,12 +3,8 @@ import type { Node, Root as MdastRoot, Root } from 'mdast';
|
|
|
3
3
|
import type { MdxJsxFlowElement, MdxJsxTextElement, MdxjsEsm } from 'mdast-util-mdx';
|
|
4
4
|
import type { MdxJsxAttribute } from 'mdast-util-mdx-jsx';
|
|
5
5
|
import type { Point } from 'unist';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
* Single instance of acorn parser extended with `acorn-jsx`
|
|
9
|
-
* to parse expressions containing JSX.
|
|
10
|
-
*/
|
|
11
|
-
export declare const jsxAcornParser: typeof Parser;
|
|
6
|
+
import { jsxAcornParser } from '../lib/utils/jsx-acorn-parser';
|
|
7
|
+
export { jsxAcornParser };
|
|
12
8
|
/**
|
|
13
9
|
* Evaluate a JavaScript expression source and return its value.
|
|
14
10
|
*
|