Skip to content

Commit ec8cfb8

Browse files
committed
Change default to true
1 parent 443309e commit ec8cfb8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
},
6060
"snippet-copy.convertTabsToSpaces.enabled": {
6161
"type": "boolean",
62-
"default": "false",
62+
"default": "true",
6363
"description": "Convert tabs in a snippet to spaces"
6464
},
6565
"snippet-copy.convertTabsToSpaces.tabSize": {

src/lib/textHelpers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export function generateCopyableText(document: TextDocument, selection: Selectio
3434
const minimumIndentation = minimumIndentationForLineIndexes(document, lineIndexes);
3535
const text = contentOfLinesWithAdjustedIndentation(document, lineIndexes, minimumIndentation);
3636

37-
if (config.convertTabsToSpaces.enabled) {
38-
return replaceLeadingTabsWithSpaces(text, config.convertTabsToSpaces.tabSize);
37+
if (!config.convertTabsToSpaces.enabled) {
38+
return text;
3939
}
4040

41-
return text;
41+
return replaceLeadingTabsWithSpaces(text, config.convertTabsToSpaces.tabSize);
4242
}
4343

4444
export function wrapTextInMarkdownCodeBlock(document: TextDocument, text: string, addLanguageId = false): string {

0 commit comments

Comments
 (0)