Browse Source

Fix char index misalignment after ignoring.

scossu 11 months ago
parent
commit
ed5a8e5353
1 changed files with 1 additions and 0 deletions
  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}")
                     logger.info(f"Ignored token: {ctx.tk}")
                     ctx.dest_ls.append(ctx.tk)
                     ctx.dest_ls.append(ctx.tk)
                     ctx.cur += step
                     ctx.cur += step
+                    cur_char = ctx.src[ctx.cur]
                     ctx.ignoring = True
                     ctx.ignoring = True
                     break
                     break
             # We looked through all ignore tokens, not found any. Move on.
             # We looked through all ignore tokens, not found any. Move on.