Open sazima1 opened 3 months ago
This also happens when using heredoc to create a file:
- name: Setup Config Files
run: | # shell
echo "Setup Config Files"
config_file_content=$(cat <<-EOF
key1=value1
key2=value2
EOF
)
echo "$config_file_content" > config.ini
The syntax highlighting appears to break from the opening parenthesis of the $(cat <<-EOF
bit.
Before it, proper highlighting looks like this:
After that, the rest of the yaml steps appear as inline strings and GH variables' braces appear as inner braces (purple rather than yellow):
@sazima1 did you find any workaround for this?
@tidharm, no I have not found a workaround, sadly.
When you use the
# shell
syntax highlighting, the rest of the YAML syntax highlighting will break down after you usefor i in {1..60}; do
. It is specifically the curly braces and first number specifying a sequence{1..60}
. If you comment out the whole embedded code block, then start to type the line, it will break the YAML formatting right after you type "in {1". If you use the other for loop syntaxfor ((i = 0 ; i < 10 ; i++ )); do
, the formatting is fine.