github / github/vscode-github-actions

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

Đang mở
#259 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
660
Fork
213
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện vấn đề tô sáng trong một tệp workflow mới bằng ví dụ YAML trong issue, với extension v0.26.2. So sánh các chú thích chứa `if:` với các chú thích trong đó `if` không có dấu hai chấm; được xem là hoàn tất khi văn bản `if:` và phần văn bản chú thích theo sau vẫn có màu xám mà không thay đổi phần tô sáng workflow khác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript, vscode
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.