Skip to content

[purs ide] Add import chomps line on windows #2833

Description

@nwolverson

Running on windows, with a source file with CRLF line endings, add import seems to be removing a line after the import section. Converting to LF line endings, seems to be fine with everything else unchanged.

e.g.

module Main.Module where

import Prelude
import Control.Monad.Eff.Console (log)
main = do
  log "Hello sailor!"
  logShow

becomes

module Main.Module where

import Prelude
import Control.Monad.Eff.Console (log, logShow)
  log "Hello sailor!"
  logShow

Called as addImport with temp file as input/output

Originally raised as nwolverson/vscode-ide-purescript#52

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions