Skip to content

Commit

Permalink
Refactor reverse_with_rules function to handle additional cases
Browse files Browse the repository at this point in the history
  • Loading branch information
hitblast committed Jan 1, 2024
1 parent 8d35118 commit 959c6bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions avro/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ def reverse_with_rules(cursor: int, fixed_text: str, text_reversed: str) -> str:
added_suffix = 'o'

try:
if fixed_text[cursor + 1] in config.AVRO_KAR:
added_suffix = ''
if fixed_text[cursor + 2] in config.AVRO_KAR and not cursor == 0:
if (fixed_text[cursor + 1] in config.AVRO_KAR) or (
fixed_text[cursor + 2] in config.AVRO_KAR and not cursor == 0
):
added_suffix = ''

except IndexError:
Expand Down

0 comments on commit 959c6bb

Please sign in to comment.