-
Notifications
You must be signed in to change notification settings - Fork 111
fix vscode 1.29.0's breaking feature: eol=auto #66
Conversation
2ab51a6
to
50d6a84
Compare
@@ -265,9 +265,12 @@ class MarkdownTocTools { | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should come from the current document 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.eol
to"\n"
or"\r\n"
in vscode settings.auto
is a new feture introduced in v1.29.0