Skip to content

Commit 958c926

Browse files
committed
[ document ] beautify HTML, judged by IDE theme.
1 parent 634988c commit 958c926

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/org/ice1000/julia/lang/editing/julia-document.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.intellij.openapi.wm.ToolWindow
66
import com.intellij.openapi.wm.ToolWindowFactory
77
import com.intellij.psi.PsiElement
88
import com.intellij.ui.content.ContentFactory
9+
import com.intellij.util.ui.UIUtil
910
import org.apache.commons.lang.StringEscapeUtils
1011
import org.ice1000.julia.lang.JuliaBundle
1112
import org.ice1000.julia.lang.module.*
@@ -45,8 +46,13 @@ class JuliaDocumentProvider : AbstractDocumentationProvider() {
4546

4647
companion object {
4748
// language=HTML
48-
val STYLE_HTML
49-
get() = """<style>code{color:rgb(255,121,198)}</style><script>console.log(2333);</script>"""
49+
val STYLE_HTML: String
50+
get() =
51+
if (UIUtil.isUnderDarcula()) {
52+
"""<style>code{color:rgb(255,121,198)}</style>"""
53+
} else {
54+
"""<style>code{color:rgb(176,55,118)}</style>"""
55+
}
5056
}
5157
}
5258

0 commit comments

Comments
 (0)