github / github/vscode-github-actions

`if` statement in comment not shown as comment (syntax highlighting)

Aperta
#259 1 commento 1 reazione 0 assegnatari Vedi su GitHub
bug
Lingua principale
TypeScript
Stelle
660
Fork
213
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a new workflow file and paste in the below code.
2. Observe how `if: ...` is highlighted incorrectly.

```yml
name: Example Workflow File
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: A fake step
run: echo Hello World
# This is a block comment
# The if: with a colon after it is not highlighted properly
# An if without a colon is fine.

```

**Expected behavior**
A clear and concise description of what you expected to happen.
The `if:` and following text should remain grey like a comment.

**Screenshots**
If applicable, add screenshots to help explain your problem.

![image](https://github.com/github/vscode-github-actions/assets/91494019/d6aca271-4675-445b-a98a-69bc62bf7079)

**Extension Version**
`v0.26.2`

**Additional context**
Add any other context about the problem here.

This seems slightly related to #158

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il problema di evidenziazione in un nuovo file di workflow usando l’esempio YAML nell’issue, con extension v0.26.2. Confronta i commenti contenenti `if:` con i commenti in cui `if` non ha i due punti; il lavoro è completato quando il testo `if:` e il testo del commento successivo rimangono grigi senza modificare il resto dell’evidenziazione del workflow.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript, vscode
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.