GNOME Bugzilla – Bug 738167
Entity references in XML command attributes are incorrectly handled
Last modified: 2018-07-30 10:40:11 UTC
Given the following documentation comment (which is valid according to whatever tool Visual Studio invokes to produce a documentation XML file from C# code), /// <summary> /// Translates an <see cref="IDictionary<K, V>"/> to a ... /// <summary> doxygen produces HMTL documentation such that the HMTL document contains <p>Translates an IDictionary&lt;K, V&gt; to a ...</p> which renders as Translates an IDictionary<K, V> to a ...
Sorry about the typos -- that should be a closing summary tag at the end of the documentation comment and "HTML" rather than "HMTL".
+1 for this - it's a really serious bug and is making it very difficult for us to use doxygen. The whole point of the C# XML input format is that it's valid XML, and Visual Studio will complain or even fail to compile in some cases if it isn't, so it's important that doxygen can cope with < > entity references to specify the < and > characters in code snippets like this. It should be pretty simple to implement a find-replace preprocessor step for key XML entities such as < and > (and it could be a configurable option if needed for backwards compatibility reasons)
inside cref it is easy to add support for < and > So I'll add that as well (next to the more readable { and })
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.9. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant (preferrably in the form of a self-contained example).
Thanks. This is partly fixed, but also partly worse in 1.8.9 than 1.8.8: - in 1.8.9 <T>, <T>T; and {T} are all now transformed to <T> which is great - but unlike 1.8.8, in 1.8.9 references to generic TYPES/classes are no longer transformed into links (whichever syntax is used, and regardless of AUTOLINK_SUPPORT setting). i.e. cref="MyGenericMethod{T}(MyGenericType{T})" is correctly transformed to a link to , but cref="MyGenericType{T}" is not transformed to a link (just to the text MyGenericType<T>). So there is an important regression from the previous release. It's close though! :)
Does it work if you use cref="MyGenericType" instead of cref="MyGenericType{T}"? (not saying that is a good solution, but that may gives me a hint where to look).
It doesn't make a different in 1.8.8, but yes in 1.8.9 the link is generated if you specify cref="MyGenericType" without the {T} argument. (btw in some parts of our code we have both a generic and a non generic type with the same name - which is allowed by .NET, and are treated as separate types - so this wouldn't be a workaround for us. But note I'm seeing the problem even for simpler cases) Here's the code: public class Foo<T> { } /// <summary> /// Represents the name and type of a field in an <see cref="EventType"/>. /// </summary> /// <remarks> /// a <see cref="Foo<T>"/> /// b <see cref="Foo{T}"/> /// c <see cref="Foo"/> /// d <see cref="Foo<T>"/> /// </remarks> public class Bar { } On 1.8.8, only (d) gets made into a link, in 1.8.9 only (c) gets made into a link. What I expect is for a/b/d (but not c) to be made into links.
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to https://github.com/doxygen/doxygen/issues All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github. Hence I am closing this GNOME Bugzilla ticket. Please use the corresponding ticket in Github instead. Thanks a lot!