double curly brace can have incorrect syntax highlighting inside format within expression
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- tooling
调研方向
首先在 VS Code 编辑器中复现该工作流,并检查扩展如何高亮嵌套的 GitHub Actions 表达式和格式字符串。跟踪用于表达式解析的语法高亮入口点,然后验证经过转义的双闭花括号不会被视为表达式结束,而最后的闭花括号仍会被高亮。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
When a double closing curly brace (}} is used as an escape to represent a single closing curly brace (}) inside a format function that is within an expression, it gets incorrectly colored as the end of the expression.
To Reproduce
Steps to reproduce the behavior:
- With the workflow file below, open in vscode editor
- View the syntax highlighting as incorrect. The first double closing curly brace on line 19 should not be yellow.
name: Double Curly Brace Workflow
on:
workflow_dispatch:
inputs:
something-to-print:
description: Something to print in powershell.
required: true
type: string
jobs:
double_curly_brace_job:
runs-on:
labels: windows
steps:
- name: Double Curly Brace Step
env:
VAR_WITH_DOUBLE_CURLY_BRACE: "${{ format('{{ {0} }}', inputs.something-to-print) }}"
run: |
echo "${{ env.VAR_WITH_DOUBLE_CURLY_BRACE }}"
Expected behavior
The last double closing curly brace should be yellow on line 19.
Screenshots
Extension Version
v0.26.5
Additional context
I am testing this on Mac OS Sonoma 14.5
code --version
1.91.1
f1e16e1e6214d7c44d078b1f0607b2388f29d729
x64
- 主要语言
- TypeScript
- 星标
- 661
- 派生
- 214
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/vscode-github-actions 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
github/vscode-github-actions#627 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 20/100
github/vscode-github-actions#630 ·
-
long work 未关闭
难度 4/5 3-5 天 新手友好度 25/100
github/vscode-github-actions#628 ·
-
bug
难度 3/5 1-2 天 新手友好度 55/100
github/vscode-github-actions#625 ·
-
bug
难度 3/5 1-2 天 新手友好度 64/100
github/vscode-github-actions#621 · 3 条评论 ·
查看 github/vscode-github-actions 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·