diff --git a/src/main/java/org/nixos/idea/psi/impl/AbstractNixString.kt b/src/main/java/org/nixos/idea/psi/impl/AbstractNixString.kt index abe45bd9..972dac28 100644 --- a/src/main/java/org/nixos/idea/psi/impl/AbstractNixString.kt +++ b/src/main/java/org/nixos/idea/psi/impl/AbstractNixString.kt @@ -3,9 +3,7 @@ package org.nixos.idea.psi.impl import com.intellij.lang.ASTNode import com.intellij.openapi.diagnostic.Logger import com.intellij.psi.PsiLanguageInjectionHost -import com.intellij.psi.impl.source.tree.LeafElement import com.intellij.psi.impl.source.tree.LeafPsiElement -import com.intellij.util.IncorrectOperationException import org.nixos.idea.psi.NixIndString import org.nixos.idea.psi.NixString import org.nixos.idea.psi.NixStringLiteralEscaper @@ -21,8 +19,9 @@ abstract class AbstractNixString(private val astNode: ASTNode) : PsiLanguageInje LOG.info("not a nix ind string") return this } + val withoutQuotes = s.substring(2..(s.lastIndex - 2)) (astNode.firstChildNode.treeNext.firstChildNode as? LeafPsiElement) - ?.replaceWithText(s) + ?.replaceWithText(withoutQuotes) return this }