highlightjs/highlight.js

(Java) Generic type variable not highlighted

已关闭

#4,017 创建于 2024年3月15日

 (8 条评论) (0 个反应) (0 位负责人)JavaScript (3,497 个派生)batch import
buggood first issuehelp welcomelanguage

仓库指标

星标
 (22,960 个星标)
PR 合并指标
 (平均合并 6分钟) (30 天内合并 2 个 PR)

描述

Describe the issue In a Java statement that declares and assigns a variable with a generic type, the type and variable don't get highlighted. Without the generic type they are properly highlighted.

Which language seems to have the issue? java

Are you using highlight or highlightAuto? highlightElement ...

Sample Code to Reproduce

Expected behavior Without the generic type, the type (Map) and variable (params) get highlighted. They should be similarly highlighted also when the generic type is present (and the generic type itself should be highlighted as well).

Additional context The example shows two generic types, but the issue also occurs with a single type such as List. This is the proper way of defining such collections.

贡献者指南