xmldoc2md icon indicating copy to clipboard operation
xmldoc2md copied to clipboard

Generated link to nested type resolves to the wrapper.

Open tmheath opened this issue 1 year ago • 2 comments

Currently given a method which returns a wrapped value, this tool generates a link to the documentation for the wrapper leaving no link to the wrapped object's documentation. Unless you would consider it harmful to add a feature to provide a link to each of these classes or provide an option to enable linking to the wrapped class then I can submit a PR for this feature.

My question if it would be good to add this feature is would it be better to add an option or just default to linking to the wrapped value, and if link to the wrapped value should it generate each link to the wrapper and the wrapped values? Finally also I can look for it specifically, I have read through a little bit of the code base, is there a specific file that you know contains what would need modified?

tmheath avatar Dec 11 '23 15:12 tmheath

Can you please provide an example so I can be sure I understand the feature you want?

You can of course propose a PR and apply this behavior by default without offering an option. I think you will need to modify the TypeDocumentation.cs file.

Thank you for your contribution to this project!

charlesdevandiere avatar Jan 04 '24 11:01 charlesdevandiere

I believe that I found where to look from that link you sent. I'll open a PR eventually, it's going to take a while for me to get around to it though, busy with several things personal now in addition to being at work right now.

I'm thinking it's line 47, looked at the head of XmlDocument class file real quick. The problem is that, as an example, Nullable<InsertCustomType> and Nullable<List<InsertCustomType> both generate only a single link over itself which points at Nullable, as Nullable, among other classes, are used with extreme frequency this renders the link to documentation for InsertCustomType useless for these few cases.

If I don't get to submitting a PR by the end of this weekend, then I should be able to by the next.

Thanks

tmheath avatar Jan 04 '24 14:01 tmheath