Skip to content

Commit af1de61

Browse files
committed
feat(isc): escape quotes in heredoc-derived note lines
1 parent 2396827 commit af1de61

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

exe/codemod-imp-to-isc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ module Interscript
422422
# Blank line inside heredoc — preserve as \n
423423
@out << "\\n"
424424
elsif @scanner.scan(/\n[ \t]+([^\n]*)/)
425-
# Indented line — strip indent, join with \n
426-
@out << "\\n" + @scanner[1].to_s
425+
# Indented line — strip indent, join with \n. Escape quotes.
426+
@out << "\\n" + @scanner[1].to_s.gsub('"', '\\"')
427427
elsif @scanner.scan(/\n/)
428428
@out << "\\n"
429429
elsif @scanner.scan(/([^\n]+)/)

0 commit comments

Comments
 (0)