Open d-e-s-o opened 10 months ago
The following patch seems to fix the test:
--- src/parser/utils.rs
+++ src/parser/utils.rs
@@ -81,6 +81,7 @@ pub fn line_separated<'a, O, E: ParseError<&'a str>, F: Parser<&'a str, O, E>>(
/// ```
pub fn unfold(input: &str) -> String {
input
+ .replace("\\n", "\n")
.split("\r\n ")
.flat_map(|l| l.split("\n "))
.flat_map(|l| l.split("\r\n "))
though I am not convinced that it is doing truly the correct thing at the right point in time (one indication being that it causes the folding_consistency
test to fail).
I am not sure if the following is expected behavior:
This test fails:
It seems as if newlines are encoded to
\\n
(correct) but then never decoded back to\n
in this scenario. I'd expect that at the level of aTodo
object, I as the user shouldn't have to deal with such encoding matters -- it should all happen transparently. So I am wondering: Is this behavior intended?