Duplicate <summary> in inline comments while rewriting XML comments in C++
Brief Description
Duplicate
C++:
/// <summary>text</summary>
enum_element = 0,
C#:
/// <summary><summary>text</summary></summary>
enum_element = 0,
Need to modify GenerateInlineSummary to something like:
if( comment.BriefText.StartsWith( "<summary>" ) && comment.BriefText.EndsWith( "</summary>" ) )
WriteLine("{0} {1}", Options.CommentPrefix, comment.BriefText);
else
WriteLine( "{0} <summary>{1}</summary>", Options.CommentPrefix, comment.BriefText);
Ideally it should be able to parse C++ XML comments and rewrite(?) it to C# XML comments
OS: Windows / OS X / Linux (include version and/or distro)
Used headers
Used settings
Target: MSVC/GCC/Clang
Other settings
Stack trace or incompilable generated code
I believe @Oceanswave had a similar issue and developed a custom pass that deals with it.
https://github.com/BaristaLabs/ChakraSharp/blob/master/ChakraSharp/FixCommentsPass.cs
We'd like to see this integrated back into C++#, we can integrate it as an official pass if someone sends a PR (if possible with a test case, should be easy, just extend the one in tests, like Common).
Should I simply duplicate @Oceanswave 's code for this? Or even if I write it again, it will look fairly similar to his since I have read it now >_< ... OR is the solution in the asker's comment acceptable?
The license of the code is compatible so I think we can take and improve the linked code.