-
-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
The base bash highlighting "breaks" if there is a space before the closing heredoc tag
thing=foobar
cat <<EOF >/tmp/foobar
thing = ${thing}
EOF # breaks with a space here
echo "done"
Now this is correct from the perspective of a regular bash script, but if the bash grammar is embedded within another grammar with a leading indent (like a block of code in a yaml document) it breaks the highlighting
mything:
UserData:
Fn::Base64:|
thing=foobar
cat <<EOF >/tmp/foobar
thing = ${thing}
EOF
echo "done"
I am using this to inject the grammar
; extends
(block_mapping_pair
key: (flow_node) @_run
(#any-of? @_run "UserData")
value: (block_node
(block_mapping
(block_mapping_pair
key: (flow_node)
value: (block_node
(block_scalar) @injection.content
(#set! injection.language "bash"))))))
I'm not sure if there is a way even a way around this though.
Metadata
Metadata
Assignees
Labels
No labels