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
Read a Second Heredoc on One Opener Line Without Letting Its Apostrophes Hide Later Comments #3428
The prose gate reads only the first heredoc on an opener line as a heredoc. A second one (<<A 3<<B) is read as code, so an apostrophe in its body opens a bash string that Pygments extends to the next ', hiding every comment between the two from comment-wrap, comment-case, comment-added and issue-ref.
Reproduction (constructed)
- run: | diff - /dev/fd/3 <<A 3<<B one A The build didn't publish. B # retry the upload. jq -r '.x' o.json
uv run --no-project --script .github/actions/prose-gate/prose_lint.py --check comment-case x.yml reports nothing, where the comment opens lowercase. The same shape in a .sh file is read by the patched HEREDOC rule, which also handles one heredoc per opener line.
What fixing it needs
The HEREDOC rule in prose_lint.py ends a body on the first opener's terminator and has no way to queue a second. Reading a second body means the lexer carries the pending delimiters across the line. This is a pre-existing gap found while fixing #3413 and is rare in real run blocks.
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…
Lex Each of Two Heredoc Bodies Alone and Keep Autolinks Out of the Co…
Promote the Prose Gate's Digit, Second, and Non-Shell Heredoc and Bac…