Prettier 1.8.2
Playground link
--parser markdown
--use-tabs
Input:
# List with 2 space indentation and `-` (correct)
- Top level list item 1
- Top level list item 2
- Nested List item 1
- Nested List item 2
- Sub-Nested List item 1
- Sub-Nested List item 2
# List with 2 space indentation and `*` (correct)
* Top level list item 1
* Top level list item 2
* Nested List item 1
* Nested List item 2
* Sub-Nested List item 1
* Sub-Nested List item 2
# List with 2 space indentation and `-` (correct)
- Top level list item 1
- Top level list item 2
- Nested List item 1
- Nested List item 2
- Sub-Nested List item 1
- Sub-Nested List item 2
# List with 2 space indentation and `*` (correct)
* Top level list item 1
* Top level list item 2
* Nested List item 1
* Nested List item 2
* Sub-Nested List item 1
* Sub-Nested List item 2
# List with 1 tab indentation and `-` (incorrect)
- Top level list item 1
- Top level list item 2
- Nested List item 1
- Nested List item 2
- Sub-Nested List item 1
- Sub-Nested List item 2
# List with 1 tab indentation and `*` (incorrect)
* Top level list item 1
* Top level list item 2
* Nested List item 1
* Nested List item 2
* Sub-Nested List item 1
* Sub-Nested List item 2
Output:
# List with 2 space indentation and `-` (correct)
* Top level list item 1
* Top level list item 2
* Nested List item 1
* Nested List item 2
* Sub-Nested List item 1
* Sub-Nested List item 2
# List with 2 space indentation and `*` (correct)
* Top level list item 1
* Top level list item 2
* Nested List item 1
* Nested List item 2
* Sub-Nested List item 1
* Sub-Nested List item 2
# List with 2 space indentation and `-` (correct)
* Top level list item 1
* Top level list item 2
* Nested List item 1
* Nested List item 2
* Sub-Nested List item 1
* Sub-Nested List item 2
# List with 2 space indentation and `*` (correct)
* Top level list item 1
* Top level list item 2
* Nested List item 1
* Nested List item 2
* Sub-Nested List item 1
* Sub-Nested List item 2
# List with 1 tab indentation and `-` (incorrect)
* Top level list item 1
* Top level list item 2 - Nested List item 1 - Nested List item 2 - Sub-Nested
List item 1 - Sub-Nested List item 2
# List with 1 tab indentation and `*` (incorrect)
* Top level list item 1
* Top level list item 2 _ Nested List item 1 _ Nested List item 2 _ Sub-Nested
List item 1 _ Sub-Nested List item 2
Second Output:
# List with 2 space indentation and `-` (correct)
* Top level list item 1
* Top level list item 2 _ Nested List item 1 _ Nested List item 2 _ Sub-Nested
List item 1 _ Sub-Nested List item 2
# List with 2 space indentation and `*` (correct)
* Top level list item 1
* Top level list item 2 _ Nested List item 1 _ Nested List item 2 _ Sub-Nested
List item 1 _ Sub-Nested List item 2
# List with 2 space indentation and `-` (correct)
* Top level list item 1
* Top level list item 2 _ Nested List item 1 _ Nested List item 2 _ Sub-Nested
List item 1 _ Sub-Nested List item 2
# List with 2 space indentation and `*` (correct)
* Top level list item 1
* Top level list item 2 _ Nested List item 1 _ Nested List item 2 _ Sub-Nested
List item 1 _ Sub-Nested List item 2
# List with 1 tab indentation and `-` (incorrect)
* Top level list item 1
* Top level list item 2 - Nested List item 1 - Nested List item 2 - Sub-Nested
List item 1 - Sub-Nested List item 2
# List with 1 tab indentation and `*` (incorrect)
* Top level list item 1
* Top level list item 2 _ Nested List item 1 _ Nested List item 2 _ Sub-Nested
List item 1 _ Sub-Nested List item 2
Expected behavior:
Tab-indented nested lists should work the same as space-indented, especially if --use-tabs is on.
This also makes using tabs for indentation indeterministic.
Prettier 1.8.2
Playground link
Input:
Output:
Second Output:
Expected behavior:
Tab-indented nested lists should work the same as space-indented, especially if
--use-tabsis on.This also makes using tabs for indentation indeterministic.