Skip to content

Commit 01f28b3

Browse files
committed
feature: support reference of if inside {{else if}}
1 parent 1710e0e commit 01f28b3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Changelog
44
===============================================================================
5+
## 2023.1.49
6+
- feature: support reference of `if` inside `{{else if}}`
7+
58
## 2023.1.47
69
- fix: gts formatting freeze on large files
710
- fix: remove import suggestions for args properties in templates

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212

1313

1414
group = "com.emberjs"
15-
version = "2023.1.48"
15+
version = "2023.1.49"
1616

1717
// Configure project's dependencies
1818
repositories {

src/main/kotlin/com/emberjs/hbs/HbsLocalReference.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@ class HbsLocalReference(private val leaf: PsiElement, val resolved: Any?) : HbRe
382382

383383
val name = element.text.replace("IntellijIdeaRulezzz", "")
384384

385+
if (name == "if") {
386+
return HbsModuleReference(element, "helper")
387+
}
388+
385389
val closeMustache = PsiTreeUtil.collectParents(element, HbCloseBlockMustache::class.java, false) { it is HbBlockWrapper }.firstOrNull()
386390
if (closeMustache != null) {
387391
val blockWrapper = closeMustache.parent

0 commit comments

Comments
 (0)