fix vscode 1.29.0's breaking feature: eol=auto#66
fix vscode 1.29.0's breaking feature: eol=auto#66gfx wants to merge 1 commit intoalanwalk:masterfrom
Conversation
2ab51a6 to
50d6a84
Compare
| private createToc(editBuilder : TextEditorEdit, headerList : any[], insertPosition : Position) { | ||
| let lineEnding = <string> workspace.getConfiguration("files").get("eol"); | ||
| if (lineEnding === "auto") { | ||
| lineEnding = "\n"; |
There was a problem hiding this comment.
I think it should come from the current document 🤔
There was a problem hiding this comment.
Right, should be better taken either from current document, or probably vscode provides some API to resolve auto to os-specific value.
|
@gfx wanted to link the original VSCode changes
Don't know if you can call one of those |
|
Now seeing that #72 looks to be a duplicate of this, although a slightly different implementation. |
|
From #72 (review)
I dug around in the VSCode Extension API and couldn't really find anything about determining the OS EOL's value. Looks like we should be able to use |
|
Should this be closed then to let #72 go through? |
|
Closed in favor of #80 |
Fix #65
workaround before this PR
Set
files.eolto"\n"or"\r\n"in vscode settings.autois a new feture introduced in v1.29.0