on master help sign in
Merge pull request #1559 from urbit/mp/strip-ids

schema: strip special characters from section ids

commit5e7618ac35a611f5cab79b546fb4c005ac81cf4f authormatildepark <matilde.park@urbit.org> dateMon 13 Jun 2022, 23:52 (4 years ago) parent4be3a1ed413305
1 file changed+1−1
components/schema/Heading.markdoc.js+1−1
components/schema/Heading.markdoc.js+1−1
@@ -11,7 +11,7 @@ function generateID(children, attributes) {
1111 return bottomChildren
1212 .filter((child) => typeof child === "string")
1313 .join(" ")
14− .replace(/[?]/g, "")
14+ .replace(/[=?!><:;,+#^|$&~"*@\.%/]/g, "")
1515 .replace(/\s+/g, "-")
1616 .toLowerCase();
1717}