SIGN IN SIGN UP

fix(interpreter): preserve leading whitespace in multi-line quoted strings (#259) (#276)

normalizeScript() trimStart()s leading indentation from script lines so
indented template literals parse, but it ran line-by-line and also stripped
leading whitespace inside multi-line single/double-quoted strings (e.g.
python3 -c with an indented body -> IndentationError). Make it quote-aware,
mirroring the earlier heredoc-aware fix: track open quote state across lines
and only strip indentation from lines that begin outside any quote; lines
that begin inside an unterminated quote are preserved verbatim. Un-skips four
sed spec tests whose indented stdin was being corrupted.
J
Jeremy Mack committed
1ec5eec0aefd099d23ac9f056df1e6612c81d49b
Parent: aec5643
Committed by GitHub <noreply@github.com> on 6/29/2026, 8:09:10 PM