Tehnix / vscode-tidymarkdown

VS Code formatter using tidymarkdown
https://marketplace.visualstudio.com/items?itemName=tehnix.vscode-tidymarkdown
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Formatting nested list results in broken layout #3

Open marzojr opened 4 years ago

marzojr commented 4 years ago

The formatter breaks nested list layout by indenting each level with two spaces. This causes rendered layout to break. Additionally, this causes MD005 warnings. Here is a before/after with source before/after the rendered cases. Using latest version available at the VSCode Market.

# Before formatting

1. Base `76(1/0)` + ea for divisor.
2. Let `hdivisor = divisor << 16`
3. Repeat 15 times:

    1. Let `dividend = dividend << 1`
    2. if `carry == 1`: let `dividend = dividend - hdivisor`
    3. otherwise:

        1. If `dividend >= hdivisor`:

            1. Let `dividend = dividend - hdivisor`
            2. Add `2(0/0)`

        2. Otherwise add `4(0/0)`

Before formatting

  1. Base 76(1/0) + ea for divisor.
  2. Let hdivisor = divisor << 16
  3. Repeat 15 times:

    1. Let dividend = dividend << 1
    2. if carry == 1: let dividend = dividend - hdivisor
    3. otherwise:

      1. If dividend >= hdivisor:

        1. Let dividend = dividend - hdivisor
        2. Add 2(0/0)
      2. Otherwise add 4(0/0)

# After formatting

1. Base `76(1/0)` + ea for divisor.
2. Let `hdivisor = divisor << 16`
3. Repeat 15 times:

  1. Let `dividend = dividend << 1`
  2. if `carry == 1`: let `dividend = dividend - hdivisor`
  3. otherwise:

    1. If `dividend >= hdivisor`:

    2. Let `dividend = dividend - hdivisor`

    3. Add `2(0/0)`

    4. Otherwise add `4(0/0)`

After formatting

  1. Base 76(1/0) + ea for divisor.
  2. Let hdivisor = divisor << 16
  3. Repeat 15 times:

    1. Let dividend = dividend << 1

    2. if carry == 1: let dividend = dividend - hdivisor

    3. otherwise:

    4. If dividend >= hdivisor:

    5. Let dividend = dividend - hdivisor

    6. Add 2(0/0)

    7. Otherwise add 4(0/0)