Widget:StripDiacritics: Difference between revisions

From Buddha-Nature
((by SublimeText.Mediawiker))
((by SublimeText.Mediawiker))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<script>
<span id="normalizedString_<!--{$string}-->"></span><script>
const str = "<!--{$string}-->"
const str = "<!--{$string}-->"
document.getElementById("normalizedString_<!--{$string}-->").innerHTML = str.normalize("NFD").replace(/\p{Diacritic}/gu, "");
normString = str.normalize("NFD").replace(/\p{Diacritic}/gu, "");
</script><span id="normalizedString_<!--{$string}-->"></span>
document.getElementById("normalizedString_<!--{$string}-->").innerHTML = normString
</script>

Latest revision as of 14:42, 21 March 2023

<script> const str = "" normString = str.normalize("NFD").replace(/\p{Diacritic}/gu, ""); document.getElementById("normalizedString_").innerHTML = normString </script>