mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-06-10 18:44:08 +00:00
Export transliteration pairs
Just in case plugins want to use them
This commit is contained in:
parent
c4e2793b06
commit
b4ec32ca70
@ -17,7 +17,7 @@ Transliterate string to ASCII
|
|||||||
|
|
||||||
(Some pairs taken from http://semplicewebsites.com/removing-accents-javascript)
|
(Some pairs taken from http://semplicewebsites.com/removing-accents-javascript)
|
||||||
*/
|
*/
|
||||||
var transliterationPairs = {
|
exports.transliterationPairs = {
|
||||||
"Á":"A",
|
"Á":"A",
|
||||||
"Ă":"A",
|
"Ă":"A",
|
||||||
"Ắ":"A",
|
"Ắ":"A",
|
||||||
@ -912,7 +912,7 @@ var transliterationPairs = {
|
|||||||
|
|
||||||
exports.transliterate = function(str) {
|
exports.transliterate = function(str) {
|
||||||
return str.replace(/[^A-Za-z0-9\[\] ]/g,function(ch) {
|
return str.replace(/[^A-Za-z0-9\[\] ]/g,function(ch) {
|
||||||
return transliterationPairs[ch] || ch
|
return exports.transliterationPairs[ch] || ch
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user