stkb / Rewrap

Rewrap extension for VSCode and Visual Studio
https://marketplace.visualstudio.com/items/stkb.rewrap
Other
499 stars 58 forks source link

Handle Markdown in comments #405

Open MikeWeller opened 2 weeks ago

MikeWeller commented 2 weeks ago

When rewrapping comments in C++ (in my case, triple-slash ///) I would like the behaviour for Markdown like bullet lists to be the same as when editing Markdown (.md) files.

For example, wrapping this in Markdown:

* foo bar baz
* foo bar baz

will become

* foo bar
  baz
* foo bar
  baz

The wrapped lines are aligned to the first character of the list item and separate list items are kept separate

However wrapping in C++:

/// * foo bar baz
/// * foo bar baz

will become:

/// * foo bar
/// baz * foo
/// bar baz

This appears to be doing just a plain text wrap without any Markdown-awareness.

Perhaps there can be an option to treat comment contents as Markdown in different languages?