Widget:StripDiacritics: Difference between revisions
((by SublimeText.Mediawiker)) |
((by SublimeText.Mediawiker)) |
||
Line 1: | Line 1: | ||
<script> | <script> | ||
const str = "<!--{$string}-->" | const str = "<!--{$string}-->" | ||
str.normalize("NFD").replace(/\p{Diacritic}/gu, "") | document.getElementById("normalizedString_<!--{$string}-->").innerHTML = str.normalize("NFD").replace(/\p{Diacritic}/gu, ""); | ||
</script> | </script><span id="normalizedString_<!--{$string}-->"></span> |
Revision as of 14:40, 21 March 2023
<script> const str = "" document.getElementById("normalizedString_").innerHTML = str.normalize("NFD").replace(/\p{Diacritic}/gu, ""); </script>