better-comments icon indicating copy to clipboard operation
better-comments copied to clipboard

question mark in conditional chaining JS example gets highlighted as a question

Open mfulton26 opened this issue 4 months ago • 0 comments

I would like optional chaining to not trigger the blue question highlighting when used in the beginning of a line in a JSDoc style JavaScript @example.

/**
 * Demo
 *
 * @example
 * ```js
 * foo()
 *   .values()
 *   .map((value) => value.toString())
 *   .find((value) => value === "bar")
 *   ?.baz();
 * ```
 */
function foo() {
}

The below screenshots show that ?.baz(); is highlighted as a question, but IMO should not be:

Image Image

mfulton26 avatar Aug 09 '25 17:08 mfulton26