From 4c69aafbc0588ffb723c561680a38b621fc4b424 Mon Sep 17 00:00:00 2001 From: Pat Hermens
Date: Mon, 7 Jan 2019 11:03:57 +0100
Subject: [PATCH 2/2] Updated to use OS defaults
---
package.json | 46 ++++++++++++++++++++++++----------------------
src/extension.ts | 6 +++---
tsconfig.json | 6 +++++-
3 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/package.json b/package.json
index a7f22d4..5151c7d 100644
--- a/package.json
+++ b/package.json
@@ -35,22 +35,23 @@
"main": "./out/src/extension",
"contributes": {
"commands": [
- {
- "command": "extension.updateMarkdownToc",
- "title": "Markdown TOC: Insert/Update"
- },
- {
- "command": "extension.deleteMarkdownToc",
- "title": "Markdown TOC: Delete"
- },
- {
- "command": "extension.updateMarkdownSections",
- "title": "Markdown Sections: Insert/Update"
- },
- {
- "command": "extension.deleteMarkdownSections",
- "title": "Markdown Sections: Delete"
- }],
+ {
+ "command": "extension.updateMarkdownToc",
+ "title": "Markdown TOC: Insert/Update"
+ },
+ {
+ "command": "extension.deleteMarkdownToc",
+ "title": "Markdown TOC: Delete"
+ },
+ {
+ "command": "extension.updateMarkdownSections",
+ "title": "Markdown Sections: Insert/Update"
+ },
+ {
+ "command": "extension.deleteMarkdownSections",
+ "title": "Markdown Sections: Delete"
+ }
+ ],
"menus": {
"editor/context": [
{
@@ -71,7 +72,7 @@
}
]
},
- "keybindings":[
+ "keybindings": [
{
"command": "extension.updateMarkdownToc",
"key": "ctrl+m t"
@@ -119,12 +120,12 @@
"type": "string",
"default": "github.com",
"description": "anchor mode.",
- "enum": [
- "github.com",
- "bitbucket.org",
- "ghost.org",
+ "enum": [
+ "github.com",
+ "bitbucket.org",
+ "ghost.org",
"gitlab.com"
- ]
+ ]
}
}
}
@@ -135,6 +136,7 @@
"postinstall": "node ./node_modules/vscode/bin/install"
},
"dependencies": {
+ "@types/node": "^10.12.18",
"anchor-markdown-header": "^0.5.7"
},
"devDependencies": {
diff --git a/src/extension.ts b/src/extension.ts
index ab39735..813606f 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -269,10 +269,10 @@ class MarkdownTocTools {
let insertSpaces =