github / github/vscode-github-actions
`if` statement in comment not shown as comment (syntax highlighting)
- 主要语言
- TypeScript
- 星标
- 660
- 派生
- 213
- PR 合并指标
- 30 天内没有已合并 PR
描述
**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
贡献指南
调研方向
首先,使用 issue 中的 YAML 示例,在启用 extension v0.26.2 的新 workflow 文件中复现高亮问题。比较包含 `if:` 的注释与 `if` 后没有冒号的注释;当 `if:` 文本及其后续注释文本保持灰色,且不改变 workflow 的其他高亮时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript, vscode
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100