Improved multiline handling of xml textblock.#23
Improved multiline handling of xml textblock.#23svallebro wants to merge 1 commit intoPxtl:masterfrom
Conversation
| if (node.NodeType == XmlNodeType.Text) | ||
| return Regex.Replace(((XText)node).Value.Replace('\n', ' '), @"\s+", " "); | ||
|
|
||
| return Regex.Replace(((XText)node).Value.Replace(@" ", ""), @"^\n|[S*|\n]$","",RegexOptions.Multiline); |
There was a problem hiding this comment.
I like that you're fixing this bug... but I'm not getting why you're searching for 13 spaces. Also, shouldn't you use <para> tags if you want linebreaks in your xml comments reflected into the Markdown?
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/para
There was a problem hiding this comment.
I had not read about the tag seems like a nice thing to use.
The reason why I used replaced 12 with empty string was that it was the simplest resolution I could come up with to remove the first whitespaces that XML generator added just for structure.
I did not spend much time on this. I just wanted to share the change I needed to make it look more readable in multiline summary comments that I created in the class diagram tool.
Changed the way whitespaces are removed. To keep multiline values.