浏览代码

Fix char index misalignment after ignoring.

scossu 11 月之前
父节点
当前提交
ed5a8e5353
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scriptshifter/trans.py

+ 1 - 0
scriptshifter/trans.py

@@ -169,6 +169,7 @@ def transliterate(src, lang, t_dir="s2r", capitalize=False, options={}):
                     logger.info(f"Ignored token: {ctx.tk}")
                     ctx.dest_ls.append(ctx.tk)
                     ctx.cur += step
+                    cur_char = ctx.src[ctx.cur]
                     ctx.ignoring = True
                     break
             # We looked through all ignore tokens, not found any. Move on.