difftreelog
feat prefer to escape $ in singleline with \$
in: trunk
2 files changed
crates/nixlike/src/lib.rsdiffbeforeafterboth43 / "\\n" { "\n" }43 / "\\n" { "\n" }44 / "\\t" { "\t" }44 / "\\t" { "\t" }45 / "\\r" { "\r" }45 / "\\r" { "\r" }46 / "''$" { "$" }46 / "\\$" { "$" }47 / c:$([_]) { c }47 / c:$([_]) { c }48 rule string() -> String48 rule string() -> String49 = quiet! { "\"" v:(!"\"" c:string_char() {c})* "\"" { v.into_iter().collect() } } / expected!("<string>")49 = quiet! { "\"" v:(!"\"" c:string_char() {c})* "\"" { v.into_iter().collect() } } / expected!("<string>")crates/nixlike/src/to_string.rsdiffbeforeafterboth39 .replace('\n', "\\n")39 .replace('\n', "\\n")40 .replace('\t', "\\t")40 .replace('\t', "\\t")41 .replace('\r', "\\r")41 .replace('\r', "\\r")42 .replace("$", "''$")42 .replace("$", "\\$")43 )),43 )),44 Value::Array(a) => {44 Value::Array(a) => {45 if a.is_empty() {45 if a.is_empty() {