Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit 7d2e20d

Browse files
authored
Fix a few additional corner cases for the automatic anchor generation (#1387)
1 parent f7e2193 commit 7d2e20d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

assets/js/generate_toc_for_cms.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function addTOC() {
1818
var header_id = title
1919
.replace(/[ \n\t:&\/\$\xa0()]/g, "-")
2020
.replace(/--+/g, "-")
21-
.replace(/[\?!,.\'\"]|^-|-$/g, "");
21+
.replace(/[\?!,.\'\"\’]/g, "")
22+
.replace(/^-|-$/g, "");
2223
header.attr("id", header_id);
2324
toc +=
2425
'<li class="toc-li table-of-contents-' +

0 commit comments

Comments
 (0)