File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -227,16 +227,17 @@ def _split_by_backtick(s: str) -> list[tuple[bool, str]]:
227
227
next_quote_index = i + end - 1
228
228
break
229
229
230
- # Quote is unmatched
230
+ # Quote is unmatched (Possibly a mistake)
231
231
if next_quote_index == - 1 :
232
- next_backtick_index = s .find ("`" , backtick_index + 1 )
232
+ substrings .append ((False , substring + s [i :]))
233
+ break
233
234
# Quote is matched
234
235
else :
235
- substring += s [i : next_quote_index ]
236
- i = next_quote_index
236
+ substring += s [i : next_quote_index + 1 ]
237
+ i = next_quote_index + 1
237
238
continue
238
239
239
- # Backtick is unmatched
240
+ # Backtick is unmatched (Possibly a mistake)
240
241
if next_backtick_index == - 1 :
241
242
substrings .append ((False , substring + s [i :]))
242
243
break
You can’t perform that action at this time.
0 commit comments