File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 297
297
298
298
function _unescape_string_expr (expr)
299
299
if headof (expr) === :STRING || headof (expr) === :TRIPLESTRING
300
- expr. val = _unescape_string (replace (valof (expr), r" (?<!\\ )\\\n [\s\n ]*" => " " ))
300
+ expr. val = _unescape_string (replace (valof (expr), r" (?<!\\ )((?: \\\\ )*) \\\ n [\s\n ]*" => s " \1 " ))
301
301
else
302
302
for a in expr
303
303
_unescape_string_expr (a)
Original file line number Diff line number Diff line change 736
736
@test """ x = Foo.naah\"\"\" a \$ (asd) sd\\\n bsf\\\\ leq\n\\\\ leq\"\"\" """ |> test_expr
737
737
@test """ \"\"\" a \$ (asd) sd\\\n bsf\\\\ leq\n\\\\ leq\"\"\"\n foo""" |> test_expr
738
738
@test """ throw(ArgumentError("invalid \$ (m == 2 ? "hex (\\\\ x)" :
739
- "unicode (\\\$ u)") escape sequence"))""" |> test_expr
739
+ "unicode (\\\$ u)") escape sequence"))""" |> test_expr
740
+ @test " \" a\\\\\\\\\\\n b\" " |> test_expr
741
+ for c in 0 : 12
742
+ @test test_expr (string (" \" a" , ' \\ ' ^ c, " \n b\" " ))
743
+ end
740
744
end
741
745
end
742
746
You can’t perform that action at this time.
0 commit comments