You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skip the Run-Block Heredoc Split for a Non-Shell Step #3430
The prose gate splits heredoc bodies out of every YAML run: block, because the run key always maps to the bash lexer whatever shell: says. In a shell: python block, a left shift by a name (1 << n) reads as a heredoc opener labelled n that never closes, so the rest of the script is lexed apart from its start. When a multi-line string opens on that same line, the string's quotes pair up wrongly in the cut-off part.
Reproduction (constructed)
- shell: pythonrun: | m = 1 << n; s = """ # not a comment """ # real
Before the heredoc split the gate reports only real. With it, the gate reports not a comment and loses real. Without a multi-line string on the opener line, the false heredoc changes nothing.
What fixing it needs
Skip the heredoc split where the step's shell: names a non-shell language, or read only bash, sh, and an unset shell:. Rare: it needs a Python or similar block, a shift by a name, and a multi-line string on that line.
Activity
Lex Heredoc Bodies Apart and Skip Code Spans When Numbering Inline Co…
Promote the markdown-it Shared Reader, Heredoc Lexing, and Exit-42 Fi…
Read Digit-Labelled and Second Heredocs, Skip Non-Shell Run Splits, a…