@milkdown/preset-commonmark 7.15.0 → 7.15.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/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/node/heading.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/node/heading.ts +1 -5
package/lib/index.js
CHANGED
|
@@ -515,7 +515,7 @@ withMeta(paragraphKeymap.shortcuts, {
|
|
|
515
515
|
});
|
|
516
516
|
const headingIndex = Array(6).fill(0).map((_, i) => i + 1);
|
|
517
517
|
function defaultHeadingIdGenerator(node) {
|
|
518
|
-
return node.textContent.toLowerCase().trim().replace(
|
|
518
|
+
return node.textContent.toLowerCase().trim().replace(/\s+/g, "-");
|
|
519
519
|
}
|
|
520
520
|
const headingIdGenerator = $ctx(
|
|
521
521
|
defaultHeadingIdGenerator,
|