From 6ebbf9ac25d6ab38cf18968d70d0a1dbbc0e75bb Mon Sep 17 00:00:00 2001 From: Dennis Ushakov Date: Thu, 14 Jun 2018 03:45:01 -0700 Subject: [PATCH] remove closing html and body tags from all places --- .../codeInsight/documentation/DocumentationComponent.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java index b614c823e827..c08a06dbb971 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java @@ -563,6 +563,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr String editorFontName = StringUtil.escapeQuotes(EditorColorsManager.getInstance().getGlobalScheme().getEditorFontName()); editorKit.getStyleSheet().addRule("code {font-family:\"" + editorFontName + "\"}"); editorKit.getStyleSheet().addRule("pre {font-family:\"" + editorFontName + "\"}"); + editorKit.getStyleSheet().addRule(".pre {font-family:\"" + editorFontName + "\"}"); editorKit.getStyleSheet().addRule("html { padding-bottom: 5px; }"); editorKit.getStyleSheet().addRule("a { color: #" + ColorUtil.toHex(getLinkColor()) + "; text-decoration: none;}"); editorKit.getStyleSheet().addRule(".definition { padding: 3px 17px 1px 7px; border-bottom: thin solid #" + ColorUtil.toHex(ColorUtil.mix(DOCUMENTATION_COLOR, BORDER_COLOR, 0.5)) + "; }"); @@ -969,10 +970,8 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr } private String decorate(String text) { - text = text.trim(); - text = StringUtil.trimEnd(text, "", true); - text = text.trim(); - text = StringUtil.trimEnd(text, "", true); + text = StringUtil.replaceIgnoreCase(text, "", ""); + text = StringUtil.replaceIgnoreCase(text, "", ""); boolean hasContent = text.contains(DocumentationMarkup.CONTENT_START); if (!hasContent && !text.contains(DocumentationMarkup.DEFINITION_START)) { int bodyStart = findContentStart(text);