github / github/vscode-github-actions

Invalid syntax highlighting with or condition `||`

Abierto
#224 2 comentarios 7 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
TypeScript
Estrellas
660
Forks
213
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Describe the bug**
Syntax is invalid formatted with `||` at the begging of the line

**To Reproduce**
Steps to reproduce the behavior:
This workflow casuses invalid hightlighting on the last line:
```yaml
name: "CI / CD"

on: workflow_call

jobs:
prepare:
name: "Prepare"
runs-on: "ubuntu-22.04"
outputs:
perform-tests: "${{ steps.should-perform-tests.outputs.perform-tests }}"
perform-lint: "${{ steps.should-perform-lint.outputs.perform-lint }}"

steps:
- name: "Should perform tests"
id: "should-perform-tests"
run: |
echo "perform-tests=1" >> $GITHUB_OUTPUT

- name: "Should perform lint"
id: "should-perform-lint"
run: |
echo "perform-lint=1" >> $GITHUB_OUTPUT

ci:
name: "CI"
runs-on: "ubuntu-22.04"
needs: ["prepare"]
if: >
needs.prepare.outputs.perform-lint == 1
|| needs.prepare.outputs.perform-tests == 1
```

**Expected behavior**
The last line shouldn't be red and slanted.

**Screenshots**
![image](https://github.com/github/vscode-github-actions/assets/35669512/7ffd37b4-46ff-48f9-8d75-20d965ac55ee)

**Extension Version**
`v0.25.8`

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.