-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
Summaries should potentially be refactored here are a few issues I found
- [Bug] Summary sections should be closed
Current output
/// <summary>
/// <summary>Correct output
/// <summary>
/// </summary>- [Bug] Summaries should use triple backslashes for message
Current output
/// <summary>
// Lorem Ipsum
/// <summary>Correct output
/// <summary>
/// Lorem Ipsum
/// </summary>- [Enhancement] Multi-line Summaries are not blocked
Current output
/// <summary>
// Lorem
Ipsum
/// <summary>Correct output
/// <summary>
/// Lorem
/// Ipsum
/// </summary>- [Feature] Support for other tags in Summaries
Summaries support more tags. These tags can be found in the following documentation:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags
- [Feature] Support for auto-wrap on character length.
A method found in the following block can provide an easy way to auto-wrap on character length
var words = Regex.Replace(description, @"\s+", " ").Trim().Split(' ');
var lines = new List<string>();
var line = string.Empty;
foreach (var word in words)
{
var workingLine = $"{line} {word}";
if (workingLine.Length > characterWidth)
{
lines.Add(line.Trim());
line = word;
}
else
{
line = workingLine;
}
}
lines.Add(line.Trim());
var section = string.Join($"{Indent}/// ", lines);- [Bug] Messages that are put into Summaries should be encoded for xml
Current output
/// <summary>
// Lorem < Ipsum
/// <summary>Correct output
/// <summary>
/// Lorem < Ipsum
/// </summary>| Escape | Target |
|---|---|
& |
Ampersand – & |
' |
Apostrophe – ‘ |
> |
Greater-than sign – > |
< |
Less-than sign – < |
" |
Quotation mark – “ |