MediaWiki:Gadget-tradsim-trad2simcore.js:修订间差异
跳到导航
跳到搜索
无编辑摘要
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
| 第3行: | 第3行: | ||
window.newtrad2simcore = function newtrad2simcore(str){ | window.newtrad2simcore = function newtrad2simcore(str){ | ||
var zh2hansTable={ | var zh2hansTable={ | ||
"`”":"@」", | |||
"`“":"@「", | "`“":"@「", | ||
"`’":"@』", | "`’":"@』", | ||
| 第3,816行: | 第3,816行: | ||
}; | }; | ||
str=str.replace(/([^\u0000-\u1f00])/g,"`$1"); | str=str.replace(/([^\u0000-\u1f00])/g,"`$1"); | ||
str=str.replace(/`[^\u0000-\u1f00]/g, function repTable(s){return (zh2hansTable[s] || s);}); | str=str.replace(/`[^\u0000-\u1f00]/g, function repTable(s){return (zh2hansTable[s] || s);}); | ||
str=str.replace(/[@`]([^\u0000-\u1f00])/g,"$1"); | str=str.replace(/[@`]([^\u0000-\u1f00])/g,"$1"); | ||
return str; | return str; | ||
}; | }; | ||