QLDoc view omits `<code>` HTML elements
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- documentation
Research direction
Reproduce the issue in a query file by hovering over the provided QLDoc example in the VSCode extension. Trace the QLDoc hover/rendering path to determine why code element content is omitted. Done means the content appears in the rendered QLDoc, ideally with code formatting, without regressing the other shown HTML elements.
Written by the indexing model from the issue text.
Description
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:

- Dominant language
- TypeScript
- Stars
- 539
- Forks
- 240
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 29
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/vscode-codeql
-
bug VSCode
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/vscode-codeql#4471 · 1 comment ·
-
bug enhancement VSCode
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/vscode-codeql#592 · 2 comments ·
-
enhancement VSCode
Difficulty 3/5 1-2 days Newbie friendliness 55/100
github/vscode-codeql#4432 · 1 comment ·
-
bug VSCode
Difficulty 3/5 1-2 days Newbie friendliness 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Difficulty 3/5 1-2 days Newbie friendliness 64/100
github/vscode-codeql#4339 · 1 comment ·
All issues in github/vscode-codeql
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·