Skip to content
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

Bug: Format Table destroys nested lists in grid table #961

Closed
jbridgy opened this issue Jun 2, 2022 · 1 comment
Closed

Bug: Format Table destroys nested lists in grid table #961

jbridgy opened this issue Jun 2, 2022 · 1 comment

Comments

@jbridgy
Copy link

jbridgy commented Jun 2, 2022

Format Table of mm v2.5.12 destroys nested lists in a grid table because it deletes the leading spaces in the cells.

Example:

+----------+------------------------+
| Header 1 | Header 2               |
+==========+========================+
| bla      | This is a nested list: |
|          | - Item 1               |
|          |   + Subitem 1.1        |
|          |   + Subitem 1.2        |
|          | - Item 2               |
|          |   + Subitem 2.1        |
|          |   + Subitem 2.2        |
+----------+------------------------+

After Format Table:

+----------+------------------------+
| Header 1 | Header 2               |
+==========+========================+
| bla      | This is a nested list: |
|          | - Item 1               |
|          | + Subitem 1.1          |
|          | + Subitem 1.2          |
|          | - Item 2               |
|          | + Subitem 2.1          |
|          | + Subitem 2.2          |
+----------+------------------------+
@RickStrahl
Copy link
Owner

RickStrahl commented Jun 26, 2022

Fixed 2.5.19+.

Issue was that in the parser each line was trimmed (like Pipe table for which that is correct). Need to TrimEnd() instead and then account for the leading space in the parsed content.

TableBugsFixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants