fix(dockerfile): remove injection.combined from shell_fragment bash injection

injection.combined merges shell_fragment nodes from ALL RUN commands into
   a single bash parse tree. The bash parser receives fragments from different
   RUN blocks adjacently (no separator bytes between them), causing it to
   parse the tail of one RUN command and the head of the next as a single
   command node. This makes arguments in subsequent RUN commands receive
   @variable.parameter highlights, causing visible color bleed.

   Fix: remove injection.combined so each shell_fragment gets its own bash
   tree. Continuation lines ending in && produce has_error=true trees, but
   this is harmless for highlighting in practice.

   Fixes #6530, #7013, #7062, #6975, #5605
This commit is contained in:
Valentin Krasontovitsch 2026-02-25 13:57:40 +01:00
parent c6d295e966
commit af44a47271
No known key found for this signature in database

View file

@ -4,7 +4,6 @@
((shell_command
(shell_fragment) @injection.content)
(#set! injection.language "bash")
(#set! injection.combined))
((run_instruction
(heredoc_block) @injection.content)