第1行: |
第1行: |
− | fucntion foo(str) {
| + | $(function (){ |
− | let s1 = /([0-9A-Za-z_])([\u4e00-\u9fa5])/g | + | str = document.getElementsByClassName('mw-parser-output')[0].outerText; |
− | let s2 = /([\u4e00-\u9fa5])([0-9A-Za-z_])/g | + | let s1 = /([0-9A-Za-z_])([\u4e00-\u9fa5])/g; |
− | temp = str.replace(s1, "$1 $2") | + | let s2 = /([\u4e00-\u9fa5])([0-9A-Za-z_])/g; |
− | return temp.replace(s2, "$1 $2") | + | temp = str.replace(s1, "$1 $2"); |
− | } | + | return temp.replace(s2, "$1 $2"); |
| + | }); |