Skip to content

Commit 5fc587f

Browse files
committed
chore(process_apostrophes): rm the last if branch
1 parent fee2037 commit 5fc587f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

wikitextparser/_wikitext.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -1072,12 +1072,11 @@ def process_apostrophes(m) -> bytes:
10721072
s = starts[1]
10731073
append_bold_start(s)
10741074
return b'_' * (s - starts[0]) + m.string[s : m.end()]
1075-
if n > 5: # more than 5 apostrophes -> hide the prior ones
1076-
odd_bold_italics ^= True
1077-
odd_italics ^= True
1078-
s = starts[-5]
1079-
return b'_' * (s - starts[0]) + m.string[s : m.end()]
1080-
raise # execution should never reach here
1075+
# more than 5 apostrophes -> hide the prior ones
1076+
odd_bold_italics ^= True
1077+
odd_italics ^= True
1078+
s = starts[-5]
1079+
return b'_' * (s - starts[0]) + m.string[s : m.end()]
10811080

10821081
return bytearray(b'\n').join(
10831082
[

0 commit comments

Comments
 (0)