Skip to content

Commit

Permalink
Fix '\\ ' in multi-line string
Browse files Browse the repository at this point in the history
  • Loading branch information
tjol committed Dec 16, 2024
1 parent 66b9ac3 commit 45dab23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/str.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ kdl_owned_string _kdl_remove_escaped_whitespace(kdl_str const* s)
if (!removed_whitespace) {
// no whitespace -> keep backslash for kdl_unescape_v2()
_kdl_buf_push_char(&buf, '\\');
// definitely keep the next char as well
if ((status = _kdl_pop_codepoint(&escaped, &c)) == KDL_UTF8_OK) {
_kdl_buf_push_codepoint(&buf, c);
}
}
} else {
// Nothing special, copy the character
Expand Down

0 comments on commit 45dab23

Please sign in to comment.