Use system line ending in services compiler host#1654
Conversation
|
Hi @csnover, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
|
|
|
Wouldn't it be better to add a getNewLine() method to LanguageServiceHost (just like CompilerHost) and let the implementation provide it? You can continue defaulting to "\r\n" for backward-compat if the LanguageServiceHost implementation doesn't have a getNewLine() |
|
The problem is that sys may not be defined, e.g. In a web page. I like @Arnavion idea. But I would make the new method optional in the interface and call it to initialize the value of the newline in createlamguageservice. |
|
OK, that was the first option in the original bug. I will try to change this over the weekend to add an optional host method if someone else doesn’t get to it first. |
|
The PR is updated for language service hosts to provide a |
Use system line ending in services compiler host
|
Thanks! |
Fixes #1653.
Let me know where you want tests to go for the language services and I can add some if you’d like.