Skip to content

Commit

Permalink
replace system line separator with '`n'
Browse files Browse the repository at this point in the history
  • Loading branch information
cottand committed Jul 13, 2024
1 parent ade4a64 commit 7d2f79b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/nixos/idea/psi/impl/AbstractNixString.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.nixos.idea.psi.impl

import com.intellij.lang.ASTNode
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.psi.PsiLanguageInjectionHost
import com.intellij.psi.impl.source.tree.LeafPsiElement
import org.nixos.idea.psi.NixIndString
Expand Down Expand Up @@ -38,7 +39,7 @@ abstract class AbstractNixString(private val astNode: ASTNode) : PsiLanguageInje
// if the first line was removed in the fragment, add it back to preserve a multiline string
val withLeadingBlankLine = if (lines.first().isNotEmpty()) listOf("") + withIndent else withIndent

originalNode?.replaceWithText(withLeadingBlankLine.joinToString(separator = System.lineSeparator()))
originalNode?.replaceWithText(withLeadingBlankLine.joinToString(separator = "\n"))
return this
}

Expand Down

0 comments on commit 7d2f79b

Please sign in to comment.