Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

QLDoc view omits `<code>` HTML elements

Open
#794 2 comments 0 reactions 0 assignees View on GitHub

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

bug VSCode

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. &ast;), 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:
QLDoc VSCode extension screenshot

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>/** ... &ast;/</code>.
But this is not super important, I could probably also just omit */ from my QLDoc comment.

To Reproduce

  1. In a query file write the following QLDoc comment or add it to an existing element
    /**
     * Test <code>code</code> &ast;/ <b>bold</b> <i>italic</i>
     */
    
  2. 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:
Query Console QLDoc screenshot

Dominant language
TypeScript
Stars
539
Forks
240
Avg merge
2d 6h
Merged PRs (30d)
29

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/vscode-codeql

All issues in github/vscode-codeql

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.