ant-druha / intellij-powershell

Adds PowerShell language support to IntelliJ-based IDEs.
https://plugins.jetbrains.com/plugin/10249-powershell
Apache License 2.0
71 stars 20 forks source link

Language Injections: merge the escaping methods #191

Open ForNeVeR opened 6 months ago

ForNeVeR commented 6 months ago

Currently, we have two main string escape mechanisms used when editing the injected language fragments: com.intellij.plugin.powershell.lang.util.PowerShellStringUtil#escapeStringCharacters and com.intellij.plugin.powershell.ide.injection.PowerShellStringManipulator#escapeQuotes. Near the latter, there's a comment suggesting to merge them both in one function.

We should consider that.

See the code near this line: https://github.com/ant-druha/intellij-powershell/blob/baccc65fb41e834e8eb66642911f1a1259926856/src/main/kotlin/com/intellij/plugin/powershell/ide/injection/PowerShellStringManipulator.kt#L66

Also, look for the number of this issue in the project code base.