Skip to content

feat: Fix Java links being inside code blocks.#26

Merged
Antonz0 merged 1 commit intodevelopfrom
feature/tweak_and_fix_java_links_within_code
Apr 28, 2025
Merged

feat: Fix Java links being inside code blocks.#26
Antonz0 merged 1 commit intodevelopfrom
feature/tweak_and_fix_java_links_within_code

Conversation

@Antonz0
Copy link
Owner

@Antonz0 Antonz0 commented Apr 28, 2025

When processing links in Java code ({@link class#method(argType1, argType2, argType3)}) Doxygen wraps them first in the <computeroutput> tag (a Doxygen semantic for <code> tag in Markdown) and inside in the <ref> tag (used for creating various links).

It leads to putting links inside code, which is not valid, those links will not be parsed, unless linkAndInlineCodeAsHTML config option is used (which can be also problematic in some cases).

Added a hack-tweak that when we encounter such case (a <computeroutput> tag with a single <ref> tag in it), and linkAndInlineCodeAsHTML option is not set, we effectively inverting them, by putting links braces over code marks (backtick).

When processing links in Java code (`{@link class#method(argType1, argType2, argType3)}`) Doxygen wraps them first in the `<computeroutput>` tag (a Doxygen semantic for `<code>` tag in Markdown) and inside in the `<ref>` tag (used for creating various links).

It leads to putting links inside code, which is not valid, those links will not be parsed, unless `linkAndInlineCodeAsHTML` config option is used (which can be also problematic in some cases).

Added a hack-tweak that when we encounter such case (a `<computeroutput>` tag with a single `<ref>` tag in it), and `linkAndInlineCodeAsHTML` option is not set, we effectively inverting them, by putting links braces over code marks (backtick).
@Antonz0 Antonz0 merged commit 51f24ea into develop Apr 28, 2025
5 checks passed
@Antonz0 Antonz0 deleted the feature/tweak_and_fix_java_links_within_code branch April 28, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant