Skip to content

Commit

Permalink
chore(process_apostrophes): rm the last if branch
Browse files Browse the repository at this point in the history
  • Loading branch information
5j9 committed Apr 12, 2024
1 parent fee2037 commit 5fc587f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions wikitextparser/_wikitext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,12 +1072,11 @@ def process_apostrophes(m) -> bytes:
s = starts[1]
append_bold_start(s)
return b'_' * (s - starts[0]) + m.string[s : m.end()]
if n > 5: # more than 5 apostrophes -> hide the prior ones
odd_bold_italics ^= True
odd_italics ^= True
s = starts[-5]
return b'_' * (s - starts[0]) + m.string[s : m.end()]
raise # execution should never reach here
# more than 5 apostrophes -> hide the prior ones
odd_bold_italics ^= True
odd_italics ^= True
s = starts[-5]
return b'_' * (s - starts[0]) + m.string[s : m.end()]

return bytearray(b'\n').join(
[
Expand Down

0 comments on commit 5fc587f

Please sign in to comment.