diff --git a/src/subParsers/makehtml/heading.js b/src/subParsers/makehtml/heading.js index 9ca040e..a4910b3 100644 --- a/src/subParsers/makehtml/heading.js +++ b/src/subParsers/makehtml/heading.js @@ -140,7 +140,7 @@ showdown.subParser('makehtml.heading.id', function (m, options, globals) { .replace(/¨D/g, '') // replace rest of the chars (&~$ are repeated as they might have been escaped) // borrowed from github's redcarpet (so they should produce similar results) - .replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, '') + .replace(/[&+$,\/:;=?@"#{}|^¨¿?:~\[\]`、゠=…‥『』〝〟「」゠=…‥\\*(){}()[]【】%.。,¡!!'<>]/g, '') .toLowerCase(); } else if (options.rawHeaderId) { title = title diff --git a/test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.html b/test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.html index ed34b7b..a63809a 100644 --- a/test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.html +++ b/test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.html @@ -1,3 +1,3 @@

some header

-

some header with &+$,/:;=?@\"#{}|^~[]`\*()%.!' chars

+

some header with &+$,/:;=?@\"#{}|^¨¿?:~[]`゠=…‥『』〝〟「」\*(){}()[]【】%.。,¡!!' chars

another header > with < chars

diff --git a/test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.md b/test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.md index d547f42..773a5d6 100644 --- a/test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.md +++ b/test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.md @@ -1,5 +1,5 @@ # some header -# some header with &+$,/:;=?@\"#{}|^~[]`\\*()%.!' chars +# some header with &+$,/:;=?@\"#{}|^¨¿?:~[]`゠=…‥『』〝〟「」\\*(){}()[]【】%.。,¡!!' chars # another header > with < chars