DefaultDocumentation icon indicating copy to clipboard operation
DefaultDocumentation copied to clipboard

not all XML comments are valid markdown

Open HuiyunPeng opened this issue 3 years ago • 3 comments

I have a XML comment like this:

<summary>
some comment...
var attr = member.GetAttribute[Type]();
</summary>

In the generated markdown, this [Type]() is treated as an empty link which is not what it supposed to be. It seems DefaultDocumentation is assuming that all XML comments are valid markdown. Do you want to consider validating XML comments before turning them into markdown?

HuiyunPeng avatar Aug 22 '22 19:08 HuiyunPeng

if you type code in your documentation you should use <c> or <code> so it is properly escaped in the documentation.

Doraku avatar Aug 24 '22 09:08 Doraku

@Doraku in this particular case sure, but in general can't we only assume that xmldocs are XML-encoded? The characters []() are special in Markdown but not in XML; I think they should be rendered as-is.

madelson avatar Aug 24 '22 15:08 madelson

I guess this is somewhat related to #117 in a more general way, I'll see if there is a way to handle this at the same time.

Doraku avatar Aug 27 '22 09:08 Doraku