Skip to content

doc: stop @ref from swallowing the colon after it - #102

Merged
jll63 merged 1 commit into
boostorg:developfrom
jll63:fix/doc-ref-colons
Sep 12, 2026
Merged

doc: stop @ref from swallowing the colon after it#102
jll63 merged 1 commit into
boostorg:developfrom
jll63:fix/doc-ref-colons

Conversation

@jll63

@jll63 jll63 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

(Written by Claude Code, on behalf of @jll63.)

A colon is legal in a qualified C++ name, so MrDocs takes one that immediately follows an @ref as part of the target, and the colon then disappears from the output. Thirteen doc comments did this, and all thirteen rendered wrong:

//! @li @ref policies::std_rtti: Use standard RTTI.

renders as "policies::std_rtti Use standard RTTI." — separator gone, two sentences run together. Nothing in the build catches it: the reference still resolves, only the punctuation is lost.

The fix

A period is not a valid identifier character, so it survives. Every one of these descriptions already began with a capital, so nine of the thirteen are a one-character change with the wording untouched.

Three more are a colon that introduces a code block, which has to stay a colon — it now attaches to a word instead of to the reference (, as follows:). The last, in boost_type_erasure.hpp, was a colon introducing an explanation mid-sentence, and becomes a full stop.

Sites: core.hpp (2), default_registry.hpp (6), initialize.hpp, preamble.hpp, macros.hpp (2), interop/boost_type_erasure.hpp.

Three other spellings, rejected by rendering them

attempt result
{empty} between the reference and the colon comes out as a literal {empty} — MrDocs escapes the braces — and the colon is still eaten
a space before the colon works, but leaves " :" in the prose
the house - em-dash worst of the three: at the head of the text following a reference it becomes a nested list item, so each entry rendered as a bullet with a sub-bullet under it

That last one is worth recording, since - is the house em-dash elsewhere and looks like the obvious choice here.

Verification

Generated the reference (460 pages) and checked all thirteen individually: each separator present, each link still resolving, and no sub-bullets in default_registry's policy list. Build clean, 160/160 tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uegbpo2mmwkWaHsffQtmeB

A colon is legal in a qualified C++ name, so MrDocs takes one that immediately
follows an @ref as part of the target. The colon then disappears from the output.
Thirteen doc comments did this, and every one of them rendered wrong:

    @Li @ref policies::std_rtti: Use standard RTTI.

became "`policies::std_rtti` Use standard RTTI." - the separator gone, two
sentences run together. Nothing in the build catches it, because the reference
still resolves; only the punctuation is lost.

A period is not a valid identifier character, so it survives, and every one of
these descriptions already began with a capital - so nine of the thirteen are a
one-character change. Three more are a colon that introduces a code block, which
has to stay a colon, so it now attaches to a word instead of to the reference
("..., as follows:"). The last, in boost_type_erasure.hpp, had a colon
introducing an explanation mid-sentence, and becomes a full stop.

Three other spellings were tried and rejected, by rendering them:

- `{empty}` between the reference and the colon, which is how an .adoc page
  would do it, comes out as a literal "{empty}" - MrDocs escapes the braces -
  and the colon is still eaten.
- a space before the colon does work, but leaves " :" in the prose.
- the house ` - ` em-dash is the worst of the three: at the start of the text
  that follows a reference it becomes a *nested list item*, so each entry
  rendered as a bullet with a sub-bullet under it and the description one level
  too deep.

Verified by generating the reference and checking all thirteen: each separator
is present, each link still resolves, and the policy list in default_registry
has no sub-bullets.
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://102.openmethod.prtest3.cppalliance.org/libs/openmethod/doc/html/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-09-11 13:04:58 UTC

@jll63
jll63 merged commit ba56242 into boostorg:develop Sep 12, 2026
53 of 54 checks passed
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.

2 participants