Skip to content

Commit ea080a1

Browse files
committed
[ #363 ] never depends on Jetbrains Markdown Plugin but org.jetbrains:markdown:0.1.31 jar
1 parent 77ac5d7 commit ea080a1

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

build.gradle.kts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,7 @@ allprojects {
5555
}
5656
/* for CI */ else -> version = "2018.3"
5757
}
58-
59-
// local developing (!isCI)
60-
if (!isCI) {
61-
setPlugins("org.intellij.plugins.markdown:191.4212.41")
62-
} else {
63-
setMarkdownCompileOnly()
64-
}
58+
setMarkdownDependency()
6559
}
6660
}
6761

@@ -203,11 +197,11 @@ tasks.withType<KotlinCompile> {
203197

204198
tasks.withType<Delete> { dependsOn(cleanGenerated) }
205199

206-
fun setMarkdownCompileOnly() {
200+
fun setMarkdownDependency() {
207201
repositories {
208202
maven("https://dl.bintray.com/jetbrains/markdown/")
209203
}
210204
dependencies {
211-
compileOnly("org.jetbrains", "markdown", "0.1.28")
205+
compile("org.jetbrains", "markdown", "0.1.31")
212206
}
213207
}

change-notes.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<ul>
33
<li>For real this time (#340, #350)</li>
44
<li>Transfer project to JuliaEditorSupport</li>
5+
<li>Never depends on JB's Markdown plugin but the single jar</li>
6+
<li>Support document for `assignOp`</li>
57
</ul>
68
0.3.10.1<br/>
79
<ul>

res/META-INF/plugin.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<idea-version since-build="162.0"/>
55

66
<depends>com.intellij.modules.lang</depends>
7-
<depends>org.intellij.plugins.markdown</depends>
87
<depends optional="true" config-file="plugin-clion.xml">com.intellij.modules.clion</depends>
98
<depends optional="true" config-file="plugin-goland.xml">com.intellij.modules.go</depends>
109
<depends optional="true" config-file="plugin-idea.xml">com.intellij.modules.idea</depends>

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ class JuliaDocumentProvider : AbstractDocumentationProvider() {
3737
symbol is JuliaSymbol -> {
3838
// find previous docs
3939
val symbolOrLhs = symbol.parent.takeIf { it is JuliaSymbolLhs } ?: symbol
40-
when {
41-
symbolOrLhs.parent is JuliaAssignOp -> {
42-
val stringElement = symbolOrLhs.parent.prevRealSibling?.takeIf { it is JuliaString }
40+
val symbolParent = symbolOrLhs.parent
41+
when (symbolParent) {
42+
is JuliaAssignOp -> {
43+
val par = symbolParent.parent.takeIf { it is JuliaGlobalStatement } ?: symbolParent
44+
val stringElement = par.prevRealSibling?.takeIf { it is JuliaString }
4345
return buildDocument(stringElement?.text, name) ?: searchFromLanguageServer(symbol)
4446
}
4547
else -> // else use LanguageServer

0 commit comments

Comments
 (0)