handle nbsp in furigana (#327)
This commit is contained in:
parent
340ed59b15
commit
55cd51c079
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user