mirror of
https://github.com/chylex/IntelliJ-Inspection-Lens.git
synced 2025-04-23 12:15:46 +02:00
Revert "Strip HTML from inspection description"
This reverts commit e6be154f
Inspection description is not supposed to contain HTML, and IntelliJ itself does not render HTML in the Problems tool window. Issues with HTML in inspection descriptions should be reported to wherever those inspections are coming from.
Stripping HTML breaks any properly formatted inspections that include anything that looks like an HTML tag, so I'm reverting it.
I might remove unescaping HTML entities later, but I'm not currently aware of it breaking anything, so it can stay.
This commit is contained in:
parent
1c92cf000f
commit
fcd4d6588d
@ -39,13 +39,11 @@ class LensRenderer(info: HighlightInfo) : HintRenderer(null) {
|
||||
|
||||
private companion object {
|
||||
private fun getValidDescriptionText(text: String?): String {
|
||||
return if (text.isNullOrBlank()) " " else addMissingPeriod(convertHtmlToText(text))
|
||||
return if (text.isNullOrBlank()) " " else addMissingPeriod(unescapeHtmlEntities(text))
|
||||
}
|
||||
|
||||
private fun convertHtmlToText(potentialHtml: String): String {
|
||||
return potentialHtml
|
||||
.ifContains('<') { StringUtil.stripHtml(it, " ") }
|
||||
.ifContains('&', StringUtil::unescapeXmlEntities)
|
||||
private fun unescapeHtmlEntities(potentialHtml: String): String {
|
||||
return potentialHtml.ifContains('&', StringUtil::unescapeXmlEntities)
|
||||
}
|
||||
|
||||
private fun addMissingPeriod(text: String): String {
|
||||
|
Loading…
Reference in New Issue
Block a user