@readme/markdown 13.8.2 → 13.8.4
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/README.md +11 -5
- package/components/Callout/style.scss +1 -1
- package/components/TableOfContents/index.tsx +32 -13
- package/dist/main.css +1 -1
- package/dist/main.css.map +1 -1
- package/dist/main.js +93 -29
- package/dist/main.node.js +93 -29
- package/dist/main.node.js.map +1 -1
- package/dist/processor/transform/mdxish/normalize-compact-headings.d.ts +15 -0
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preprocessor to normalize compact headings.
|
|
3
|
+
*
|
|
4
|
+
* CommonMark requires whitespace after # for headings, but users often omit it.
|
|
5
|
+
* This preprocessor adds the space while being careful not to modify:
|
|
6
|
+
* - Content inside fenced code blocks (protected via protectCodeBlocks)
|
|
7
|
+
* - Escaped hashtags (\#)
|
|
8
|
+
* - Mid-line hashtags (text #hashtag)
|
|
9
|
+
*
|
|
10
|
+
* Examples:
|
|
11
|
+
* - `#Header` → `# Header`
|
|
12
|
+
* - `##Title` → `## Title`
|
|
13
|
+
* - `######H6` → `###### H6`
|
|
14
|
+
*/
|
|
15
|
+
export declare function normalizeCompactHeadings(content: string): string;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@readme/markdown",
|
|
3
3
|
"description": "ReadMe's React-based Markdown parser",
|
|
4
4
|
"author": "Rafe Goldberg <rafe@readme.io>",
|
|
5
|
-
"version": "13.8.
|
|
5
|
+
"version": "13.8.4",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"browser": "dist/main.js",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"path": "dist/main.node.js",
|
|
172
|
-
"maxSize": "
|
|
172
|
+
"maxSize": "875KB"
|
|
173
173
|
}
|
|
174
174
|
]
|
|
175
175
|
},
|