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)
31813181 k = kind (t)
31823182 if k == K " $"
31833183 @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
31843189 bump (ps, TRIVIA_FLAG)
31853190 k = peek (ps)
31863191 if k == K " ("
Original file line number Diff line number Diff line change @@ -816,6 +816,7 @@ tests = [
816816 ((v= v " 1.8" ,), " [\n ;; \n ]" ) => " (ncat-2)"
817817 ((v= v " 1.7" ,), " [;;]" ) => " (ncat-2 (error))"
818818 # parse_string
819+ " \"\"\"\n\$ x\n a\"\"\" " => " (string-s x \"\\ n\" \" a\" )"
819820 " \" a \$ (x + y) b\" " => " (string \" a \" (call-i x + y) \" b\" )"
820821 " \" hi\$ (\" ho\" )\" " => " (string \" hi\" (string \" ho\" ))"
821822 " \" a \$ foo b\" " => " (string \" a \" foo \" b\" )"
You can’t perform that action at this time.
0 commit comments