@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 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(/[^\w\s-]/g, "").replace(/\s+/g, "-");
518
+ return node.textContent.toLowerCase().trim().replace(/\s+/g, "-");
519
519
  }
520
520
  const headingIdGenerator = $ctx(
521
521
  defaultHeadingIdGenerator,