1
0
mirror of https://github.com/chylex/IntelliJ-Inspection-Lens.git synced 2025-05-12 23:34:09 +02:00

Unescape HTML entities in inspection description

This commit is contained in:
KostkaBrukowa 2022-10-03 10:11:52 +02:00 committed by chylex
parent cd465ebc0e
commit 963c49a3c8

View File

@ -5,6 +5,7 @@ import com.intellij.codeInsight.daemon.impl.HintRenderer
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.Inlay
import com.intellij.openapi.editor.markup.TextAttributes
import com.intellij.openapi.util.text.StringUtil
import java.awt.Font
import java.awt.Graphics
import java.awt.Rectangle
@ -41,7 +42,7 @@ class LensRenderer(info: HighlightInfo) : HintRenderer(null) {
private val ATTRIBUTES_SINGLETON = TextAttributes(null, null, null, null, Font.ITALIC)
private fun getValidDescriptionText(text: String?): String {
return if (text.isNullOrBlank()) " " else addMissingPeriod(text)
return if (text.isNullOrBlank()) " " else StringUtil.unescapeXmlEntities(addMissingPeriod(text))
}
private fun addMissingPeriod(text: String): String {