Skip to content

Commit

Permalink
FBP-73. Improve injection
Browse files Browse the repository at this point in the history
  • Loading branch information
valb3r committed Jul 22, 2023
1 parent a39d8d5 commit 00a9870
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ abstract class DefaultDelegateExpressionUiInjector: MultiHostInjector {
val text = context.text
val language = Language.getRegisteredLanguages().firstOrNull { it.id == "SpEL" } ?: return
registrar.startInjecting(language)
if (context.text.contains(spelStart) && context.text.endsWith(spelEnd)) {
if (context.text.contains(spelStart)) {
registrar.addPlace("", "", context, TextRange(3, text.length - 1))
} else if (context.text.contains(spelStart) && context.text.endsWith(spelEnd)) {
registrar.addPlace("", "", context, TextRange(3, text.length - 2))
} else {
registrar.addPlace("", "", context, TextRange(1, text.length - 1))
Expand Down

0 comments on commit 00a9870

Please sign in to comment.