Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

markdownlint shows warning on 4-space indent of subsections (expects 2 spaces) #57

Open
t7ko opened this issue Aug 22, 2018 · 2 comments · May be fixed by #92
Open

markdownlint shows warning on 4-space indent of subsections (expects 2 spaces) #57

t7ko opened this issue Aug 22, 2018 · 2 comments · May be fixed by #92

Comments

@t7ko
Copy link

t7ko commented Aug 22, 2018

I'm using markdownlint (VS Code plugin) to help me create clean MD documents. I'm using it as is, without any custom settings. When I create subsections, TOC includes nested list elements with 4 spaces per indentation level. And then lint warns me on 4 spaces indentation -- it expects 2 spaces:

[markdownlint] MD007/ul-indent: Unordered list indentation [Expected: 2; Actual: 4]
@lucianoac
Copy link

lucianoac commented Aug 31, 2018

I second that. It would be nice if toc comply with markdownlint.

Edit:

I was looking at the code and found that md-toc uses some basic vscode configurations in order create the identantion [1], such as editor.insertSpaces and editor.tabSize.

Changing my config to

"[markdown]": {
"editor.tabSize": 2 //default is 4
}

did the trick.

[1] https://github.com/AlanWalk/markdown-toc/blob/1fc815ec26d063b38502932641a80497fbf71f24/src/extension.ts#L266

@mcornella
Copy link

After #92 you can fix this by setting the tabSize of the current document, no need to change the editor.tabSize setting for all VS Code.

@mcornella mcornella linked a pull request Sep 23, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants