Skip to content

docs: add IDs to @requirement tags to fix Doxygen autolinking#5162

Merged
nlohmann merged 1 commit into
nlohmann:developfrom
VasuBhakt:develop
May 10, 2026
Merged

docs: add IDs to @requirement tags to fix Doxygen autolinking#5162
nlohmann merged 1 commit into
nlohmann:developfrom
VasuBhakt:develop

Conversation

@VasuBhakt
Copy link
Copy Markdown
Contributor

This PR fixes a documentation bug where the word "The" was being incorrectly identified as a requirement ID by Doxygen. This caused Doxygen's autolinking feature to turn every instance of the word "The" in the generated documentation into a hyperlink.

Changes:

  • Added unique requirement IDs (REQ-JSON-01 and REQ-JSON-02) to the @requirement tags in iter_impl.hpp and json_reverse_iterator.hpp.
  • Updated the amalgamated single_include/nlohmann/json.hpp file.

Why:
Doxygen's @requirement command (often an alias for \xrefitem) expects the first argument to be a unique identifier. Without it, the first word of the description ("The") was used as the ID, leading to global autolinking of that word.

  • The changes are described in detail, both the what and why.
  • If applicable, an existing issue is referenced.
  • The Code coverage remained at 100%. (Documentation only change, no code logic affected).
  • If applicable, the documentation is updated.
  • The source code is amalgamated.

@VasuBhakt VasuBhakt requested a review from nlohmann as a code owner May 9, 2026 18:36
@github-actions github-actions Bot added the S label May 9, 2026
Signed-off-by: Swastik Bose <cpswastik31@gmail.com>
Copy link
Copy Markdown
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann added this to the Release 3.12.1 milestone May 10, 2026
@nlohmann nlohmann merged commit 4fad446 into nlohmann:develop May 10, 2026
143 checks passed
@nlohmann
Copy link
Copy Markdown
Owner

Thank you!

@VasuBhakt
Copy link
Copy Markdown
Contributor Author

Thanks a lot Niels! This was my first PR! Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doxygen tag for requirement is incorrectly specifying The as requirement ID

2 participants