File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3181,6 +3181,11 @@ function parse_string(ps::ParseState, raw::Bool)
3181
3181
k = kind (t)
3182
3182
if k == K " $"
3183
3183
@assert ! raw # The lexer detects raw strings separately
3184
+ if prev_chunk_newline
3185
+ # """\n$x\n a""" ==> (string-s x "\n" " a")
3186
+ indent_ref_i = first_byte (t)
3187
+ indent_ref_len = 0
3188
+ end
3184
3189
bump (ps, TRIVIA_FLAG)
3185
3190
k = peek (ps)
3186
3191
if k == K " ("
Original file line number Diff line number Diff line change @@ -816,6 +816,7 @@ tests = [
816
816
((v= v " 1.8" ,), " [\n ;; \n ]" ) => " (ncat-2)"
817
817
((v= v " 1.7" ,), " [;;]" ) => " (ncat-2 (error))"
818
818
# parse_string
819
+ " \"\"\"\n\$ x\n a\"\"\" " => " (string-s x \"\\ n\" \" a\" )"
819
820
" \" a \$ (x + y) b\" " => " (string \" a \" (call-i x + y) \" b\" )"
820
821
" \" hi\$ (\" ho\" )\" " => " (string \" hi\" (string \" ho\" ))"
821
822
" \" a \$ foo b\" " => " (string \" a \" foo \" b\" )"
You can’t perform that action at this time.
0 commit comments