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

Nested lists in Markdown are not wrapped when indented by more than 2 spaces #79

Closed
joliss opened this issue Feb 23, 2018 · 5 comments
Closed

Comments

@joliss
Copy link

joliss commented Feb 23, 2018

With Rewrap 1.7.1, the following Markdown text does not seem to get rewrapped correctly:

* Nested list:

    * This is a very very very very very very very very very very very very very long line

    * This is a very very very very very very very very very very very very very long line

Pressing Alt+q on the nested list items only rewraps the first. Nothing happens if I try to rewrap the second.

* Nested list:

    * This is a very very very very very very very very very very very very very
      long line

    * This is a very very very very very very very very very very very very very long line

This also happens for numbered lists (1., 2.).

It only happens when the nested list is indented 4 spaces, rather than 2.

@joliss
Copy link
Author

joliss commented Feb 23, 2018

Update: Even with 2-space indentation, the same issue happens with lists nested two levels deep:

* Nested list

  * Nested list:

    * This is a very very very very very very very very very very very very very long line

    * This is a very very very very very very very very very very very very very long line

Again, only the first item will be wrapped by Rewrap.

@joliss joliss changed the title Nested lists in Markdown are not wrapped when using 4-space indent Nested lists in Markdown are not wrapped with more than 2 space indentation Feb 23, 2018
@joliss joliss changed the title Nested lists in Markdown are not wrapped with more than 2 space indentation Nested lists in Markdown are not wrapped when indented by more than 2 spaces Feb 23, 2018
@stkb
Copy link
Owner

stkb commented Feb 28, 2018

Thanks for the explanation and sorry I didn't get back to you sooner. I'll work on fixing this, but meanwhile, as workaround, it works if you remove the blank lines between list items.

I.e: the last item will wrap in this case:

* Nested list

  * Nested list:

    * This is a very very very very very very very very very very very very very long line
    * This is a very very very very very very very very very very very very very long line

@stkb
Copy link
Owner

stkb commented Feb 28, 2018

Ok never mind the workaround, I think I've fixed it, and have uploaded a beta version. You can try it from https://github.com/stkb/Rewrap/releases/tag/v1.8.0-beta2.

Let me know if you discover any other markdown bugs; I'm currently working on another subtle one.

@joliss
Copy link
Author

joliss commented Mar 1, 2018

Works great, thank you for the fix!

(Not sure if you were keeping this issue open for a reason; I'll leave it to you to close it.)

@stkb
Copy link
Owner

stkb commented Mar 1, 2018

Thanks! Will close when I publish the next version, which should be this weekend.

@stkb stkb closed this as completed Mar 5, 2018
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