Skip to content

Commit

Permalink
🐛 fix split_once_without_escape
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Nov 19, 2024
1 parent e5f5a28 commit 1d37d50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tarina/_string_c.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def split_once_without_escape(str text, str separator, bint crlf=True):
quotation = 0
if index == length:
if first_quoted_sep_index == -1:
return PyUnicode_Substring(text, 0, last_quote_index-1) if last_quote_index else str_strip(text, RIGHTSTRIP, separator), ''
return PyUnicode_Substring(text, 0, last_quote_index) if last_quote_index else str_strip(text, RIGHTSTRIP, separator), ''
return PyUnicode_Substring(text, 0, first_quoted_sep_index-1), PyUnicode_Substring(text, first_quoted_sep_index, PY_SSIZE_T_MAX)
return PyUnicode_Substring(text, 0, index-1), PyUnicode_Substring(text, index, PY_SSIZE_T_MAX)

Expand Down

0 comments on commit 1d37d50

Please sign in to comment.