Skip to content

Commit

Permalink
Merge pull request #115 from jgreffe/bug/103-IllegalArgument
Browse files Browse the repository at this point in the history
Bug 103: IllegalArgumentException: Invalid range specified: (1, -1);
  • Loading branch information
duemir authored Oct 10, 2022
2 parents 79ab21e + 887e9d2 commit fac7270
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ tasks.withType(JavaCompile) {
}

// See https://github.com/JetBrains/gradle-intellij-plugin/
// https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension

// https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
// https://plugins.jetbrains.com/docs/marketplace/product-versions-in-use-statistics.html
// https://www.jetbrains.com/idea/download/other.html
intellij {
version = ideaVersion
type.set(ideaType)
plugins = platformPlugins.tokenize(',')*.trim()
}

Expand Down Expand Up @@ -103,7 +105,7 @@ runPluginVerifier {
// Rather arbitrarily chosen first releases of last three year.
// Product version in use statistics say last 3 major releases. It does not define "major release" though but
// but educated guess is that `year.version` is what is considered major.
ideVersions = ["2020.3.2", "2021.3.3", "2022.1"]
ideVersions = ["2020.3.4", "2021.3.3", "2022.2.3"]
}

publishPlugin {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html
# the first year based version (2016.2)
ideaVersion=2020.3
# see https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension for list of accepted types
ideaType=IC
platformPlugins=properties,java
intellijPublishToken=
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ public void getLanguagesToInject(@NotNull final MultiHostRegistrar registrar, @N
return; // not a style attribute

Language language = findLanguage("CSS");
if (language == null) return;

if (language == null || value.getTextLength() < 2) return;
registrar.startInjecting(language);
registrar.addPlace("dummy_selector {","}",
(PsiLanguageInjectionHost)value,
TextRange.from(1, value.getTextLength() - 2));
registrar.addPlace("dummy_selector {", "}",
(PsiLanguageInjectionHost) value,
TextRange.from(1, value.getTextLength() - 2));
registrar.doneInjecting();
return;
}
Expand Down

0 comments on commit fac7270

Please sign in to comment.