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 comments #16

Closed
jghauser opened this issue May 16, 2021 · 1 comment
Closed

Nested comments #16

jghauser opened this issue May 16, 2021 · 1 comment

Comments

@jghauser
Copy link

Thank you very much for your great plugin!

One thing I'm missing from tpope's plugin is how it solved nested comments. This is especially relevant for the html comments that I use in my markdown files: <!-- comment -->. The problem occurs when you have a text such as:

This is a<!-- comment --> text.

When uncommenting this it becomes:

<!--This is a<!-- comment --> text.-->

That's unexpected because the comment that begins at the beginning of the line now ends at the first -->.

Tpope's plugin solved that by converting the nested comments into <1!-- comment --1>. The text then becomes:

<!--This is a<1!-- comment --1> text.-->

This string could then of course be uncommented again as well. I'm not sure if this affects languages other than markdown.

If you think this is something that nvim-comment should know how to do, you might also want to take a look at this issue; apparently the way tpope solved it leads to some problems (though this has never affected me).

@terrortylor
Copy link
Owner

Hey at the moment this feature isn't on the radar, happy to take a PR though.

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