github / github/vscode-github-actions
`if` statement in comment not shown as comment (syntax highlighting)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 660
- Forks
- 213
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**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.

**Extension Version**
`v0.26.2`
**Additional context**
Add any other context about the problem here.
This seems slightly related to #158
Beitragsleitfaden
Rechercherichtung
Beginne damit, das Hervorhebungsproblem in einer neuen Workflow-Datei mithilfe des YAML-Beispiels im Issue mit extension v0.26.2 zu reproduzieren. Vergleiche Kommentare, die `if:` enthalten, mit Kommentaren, in denen `if` keinen Doppelpunkt hat; abgeschlossen ist die Aufgabe, wenn der Text `if:` und der darauf folgende Kommentartext grau bleiben, ohne die übrige Hervorhebung des Workflows zu verändern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript, vscode
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100