Skip to content

Commit 53a1834

Browse files
committed
## 2023.1.17
- fix: gts formatting template without class
1 parent 2deba80 commit 53a1834

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
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.17
6+
- fix: gts formatting template without class
7+
58
## 2023.1.16
69
- update: add completions for helper positional parameters
710
- update: add event types for on modifier

src/main/kotlin/com/emberjs/gts/GtsSupport.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ class RootBlockWrapper(val block: XmlTagBlock, val policy: HtmlPolicy): XmlTagBl
705705
val blockRef = this.parent as? JSAstBlockWrapper ?: ((this.parent as JsBlockWrapper).parent as JSAstBlockWrapper)
706706
val psiRef = blockRef.node!!.psi.parent
707707

708-
val startOffset = psiRef.textRange?.startOffset ?: return Indent.getNormalIndent(true)
708+
val startOffset = psiRef.textRange?.startOffset ?: return Indent.getNoneIndent()
709709
val line = document.getLineNumber(startOffset)
710710
val lineOffset = document.getLineStartOffset(line)
711711
val offset = startOffset - lineOffset + ((blockRef.node!!.psi is JSClass).ifTrue { INDENT_SIZE } ?: 0)
@@ -714,7 +714,7 @@ class RootBlockWrapper(val block: XmlTagBlock, val policy: HtmlPolicy): XmlTagBl
714714
return Indent.getSpaceIndent(offset + (forChild.ifTrue { INDENT_SIZE } ?: 0))
715715
}
716716

717-
return Indent.getNormalIndent(true)
717+
return Indent.getNoneIndent()
718718
}
719719

720720
override fun getChildAttributes(newChildIndex: Int): ChildAttributes {

0 commit comments

Comments
 (0)