QLDoc view omits `<code>` HTML elements
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
调研方向
在 VSCode 扩展中将鼠标悬停在提供的 QLDoc 示例上,在查询文件中复现该问题。跟踪 QLDoc 的悬停/渲染路径,以确定为何会省略 code 元素的内容。完成标准是内容出现在渲染后的 QLDoc 中,最好带有代码格式,同时不影响其他显示的 HTML 元素。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
According to the language specification QLDoc uses CommonMark, which supports raw HTML.
It appears that the VSCode extension supports HTML entity references (e.g. *), and for some HTML elements simply shows their content without any special formatting (e.g. <b>bold</b>).
However, <code> elements are apparently completely omitted, not even their content is shown:

My use case is that I would like to write /** ... */ (a Javadoc comment) in a QLDoc, however */ is recognized as end of the QLDoc. Therefore the only workaround might be to use <code>/** ... */</code>.
But this is not super important, I could probably also just omit */ from my QLDoc comment.
To Reproduce
- In a query file write the following QLDoc comment or add it to an existing element
/** * Test <code>code</code> */ <b>bold</b> <i>italic</i> */ - Hover over the QLDoc
❌ The text "code" is completely missing from the shown rendered QLDoc
Expected behavior
- At least the content of the
<code>element should be shown in the rendered QLDoc (similar to how it is the case for<b>) - Or ideally the content of the
<code>element is shown and formatted as code
Additional context
The LGTM Query Console seems to support <code> and even formats the text as code in the preview when hovering over a documented element:

- 主要语言
- TypeScript
- 星标
- 539
- 派生
- 240
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 29
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/vscode-codeql 的其他 Issue
-
bug VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#4471 · 1 条评论 ·
-
bug enhancement VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#592 · 2 条评论 ·
-
enhancement VSCode
难度 3/5 1-2 天 新手友好度 55/100
github/vscode-codeql#4432 · 1 条评论 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 64/100
github/vscode-codeql#4339 · 1 条评论 ·
查看 github/vscode-codeql 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·