Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ class MarkdownTocTools {
let lineEnding = <string> workspace.getConfiguration("files").get("eol");
let tabSize = <number> workspace.getConfiguration("[markdown]")["editor.tabSize"];
let insertSpaces = <boolean> workspace.getConfiguration("[markdown]")["editor.insertSpaces"];


if(lineEnding === undefined || lineEnding === null || lineEnding === "auto") {
// Default back to "\n" in case of VSCode update 1.29.0,
// where `Files > EOL` was set to the string value "auto".
// See https://github.com/AlanWalk/markdown-toc/issues/65
lineEnding = "\n";
}
if(tabSize === undefined || tabSize === null) {
tabSize = <number> workspace.getConfiguration("editor").get("tabSize");
}
Expand Down