codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.89k stars 356 forks source link

Cleaning: wrap comments at column ignores length of `cref` tags #945

Open Xiphereal opened 1 year ago

Xiphereal commented 1 year ago

Environment

Description

When applying code clean up on saving with "Wrap comments at column" at 100 and "Skip wrapping on the last word" enabled, if line has a content similar to this:

/// <summary>
///    x xxx x xxx xxxx xxxxxxxxx xxxxxxxxxxx xxxx xxx xxxx xxxxxx xxxxx xxx x xxx xxxxx xxxx x xxx <see cref="Class" />.
/// </summary>

then no line wrap is applied, and the line overflow the 100 char limit.

Current behavior

Wrap comments at column ignores length of cref tags.

Expected behavior

Wrap comments at column takes into account the cref tags to the overall line length, applying the wrap accordingly.

codecadwallader commented 1 year ago

Thanks for reporting the issue. I'm not sure if that is a deliberate behavior or just a side effect of how embedded XML is calculated. @w5l any thoughts?

ghost commented 1 year ago

I have the same question.