dprint / dprint-plugin-markdown

Markdown code formatting plugin for dprint.
MIT License
29 stars 9 forks source link

option to configure tab length #126

Open DetachHead opened 2 months ago

DetachHead commented 2 months ago

the tab length seems to be 2, which causes the following list:

- foo
    - bar
    - baz

to be formatted like so:

- foo
  - bar
  - baz

this causes the nested list to be rendered incorrectly on mkdocs (see https://github.com/mkdocs/mkdocs/issues/545):

  • foo
  • bar
  • baz

this is apparently intentional behavior because the spec states that tab length should be 4, and that every implementation of markdown that allows 2 is deviating from the spec. see https://github.com/Python-Markdown/markdown/issues/3#issuecomment-63399983

i don't really have an opinion on which is correct, but an option to configure it would be nice