User:Opencooper/showKanji-dev.js: Difference between revisions

Content deleted Content added
update Wiktionary parsing
m tab to space
Line 153:
 
var leadReBase = "([ぁ-ゔァ-ヴー" + kanjiStripped + "]+)";
var kanjiEscaped = mw.util.escapeRegExp(kanji);
// Account for spaces, but ignore backslash and other misc characters
var reKanjiKanaLatin = /([\u3400-\u4DB5\u4E00-\u9FCB\uF900-\uFA6Aぁ-ゔァ-ヴーA-Za-z0-9])/g;
var kanjiSpaced = kanjiEscaped.replace(/ /g, " ?");
kanjiSpaced = kanjiSpaced.replace(reKanjiKanaLatin, "$1 ?");