-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MD007: Detect _Unordered list indentation_ based on Tab Size? #86
Comments
https://github.com/DavidAnson/markdownlint is a library that isn’t associated with any editor or workflow. It reads its configuration from a JSON file in a standard manner for libraries (e.g., ESLint). Based on the issue you linked, you seem to be referring to the https://github.com/DavidAnson/vscode-markdownlint project which wraps this library for use with the VS Code editor. In that case, configuration is still preferred from the config file for consistency with CLI tools and CI workflows. More about that here: https://github.com/DavidAnson/vscode-markdownlint/blob/master/README.md#markdownlintconfig You can imagine how difficult it would be to work on a project where everyone reformatted content according to their own personal settings/preferences. If I did make a change here, editor settings would probably have the lowest priority and I’m not sure that’s what you want. I’ll think about this more. |
Pressing the In a Markdown file, the CommonMark specification says that tab characters always correspond to 4 (space) characters. https://spec.commonmark.org/0.29/#tabs Therefore, the only sensible configuration for editing Markdown in VS Code is to have The fact that other Markdown extensions change their behavior based on The only way to reliably generate content is for extensions to ignore For unordered lists, both 2 and 4 spaces are valid. Neither is unambiguously correct, so either might reasonably be used within a file. https://spec.commonmark.org/0.29/#motivation Which is why this project's It is reasonable to ask that VS Code Markdown extensions come up with a way to agree on this value, and I would be open to doing so. However, I believe I have shown here that |
When I've Tab Size of 4 (which I think it's default), when generating TOC via markdown-toc, the markdownlint complains about:
I've checked, and in settings I had Editor: Tab Size set to 4. When changed to 2, TOC has been regenerated to use 2 spaces. So I think TOC extension works as expected (it changes on settings), however markdownlint doesn't respect the value of Tab Size.
I think it should read what's set for Editor: Tab Size and rely on that.
Related: alanwalk/markdown-toc/issues/60
The text was updated successfully, but these errors were encountered: