handle nbsp in furigana (#327)

This commit is contained in:
Damien Elmes 2013-04-11 14:45:53 +09:00
parent 340ed59b15
commit 55cd51c079

View File

@ -18,14 +18,17 @@ def noSound(repl):
return re.sub(r, repl, match.group(0))
return func
def _munge(s):
return s.replace(" ", " ")
def kanji(txt, *args):
return re.sub(r, noSound(r'\1'), txt)
return re.sub(r, noSound(r'\1'), _munge(txt))
def kana(txt, *args):
return re.sub(r, noSound(r'\2'), txt)
return re.sub(r, noSound(r'\2'), _munge(txt))
def furigana(txt, *args):
return re.sub(r, noSound(ruby), txt)
return re.sub(r, noSound(ruby), _munge(txt))
def install():
addHook('fmod_kanji', kanji)