diff --git a/core/strings/parser/parser-tests.factor b/core/strings/parser/parser-tests.factor index c9e5fe1aca..4f14869685 100644 --- a/core/strings/parser/parser-tests.factor +++ b/core/strings/parser/parser-tests.factor @@ -19,3 +19,15 @@ IN: strings.parser.tests ] [ error>> escaped-char-expected? ] must-fail-with + +[ + " \" abc \" " +] [ + "\"\"\" \" abc \" \"\"\"" eval( -- string ) +] unit-test + +[ + "\"abc\"" +] [ + "\"\"\"\"abc\"\"\"\"" eval( -- string ) +] unit-test diff --git a/core/strings/parser/parser.factor b/core/strings/parser/parser.factor index e25b640db8..2ee82a53e3 100644 --- a/core/strings/parser/parser.factor +++ b/core/strings/parser/parser.factor @@ -131,8 +131,7 @@ DEFER: (parse-long-string) dup rest-begins? [ [ lexer get ] dip length [ + ] curry change-column drop ] [ - rest-of-line % - lexer get next-line "\n" % (parse-long-string) + lexer get next-char , (parse-long-string) ] if ] if ;