-
-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix wrong refid when SEPARATE_MEMBER_PAGES is YES #566
Conversation
This is clearly a bug in Doxygen's xmlgen, so I will submit a fix there soon. This works as a band-aid and I hope without side-effects. |
cff4e4f
to
0df7eb9
Compare
@vermeeren I updated this PR now that it got clearer what the source of the issue was, doxygen/doxygen#7971 (comment); it works OK for our projects which are rather big but it's hard to say if it handles all possible permutations of ids created by Doxygen, but I guess it does. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@utzig Good implementation with a new config value, I like this. Just a few minor doc related things I noticed, can you check?
When Doxygen is configured the SEPARATE_MEMBER_PAGES set to YES, the following Doxygen input: ``` /** * This struct must be used with f() */ struct t { int x; } /** * @param tx A struct t pointer */ void f(struct t *tx) { (void)tx; } ``` The `f()` in struct t's comment generates a <ref> element with `refid` equal to `some_prefix_compoundid_anchorid`, wheres the `id` in the refered element ends up with an `id` equal to `some_prefix_anchorid`. The anchorid here is the compoundid prefix by "_1", with one or two extra 'g' prefixes for groups, so the `refid` actually has this information duplicated. This is a band-aid solution that, when configured enabled in conf.py, tries to detect the issue in the refids and removes the extra baggage, so resulting links work. Signed-off-by: Fabio Utzig <[email protected]>
@utzig Just released v4.21.0 with both PRs, thanks again! |
When Doxygen is configured the SEPARATE_MEMBER_PAGES set to YES, the following Doxygen input:
The
f()
in struct t's comment generates a element withrefid
equal tosome_prefix_compoundid_anchorid
, wheres theid
in the refered element ends up with anid
equal tosome_prefix_anchorid
. The anchorid here is the compoundid prefix by "_1", with one or two extra 'g' prefixes for groups, so therefid
actually has this information duplicated.This is a band-aid solution that, when configured enabled in conf.py, tries to detect the issue in the refids and removes the extra baggage, so resulting links work.