Add comment annotation to disable copying redef value into docs

This commit is contained in:
Tim Wojtulewicz 2025-03-28 15:00:06 -07:00
parent b1bb4e72c5
commit 55e458c5f7
7 changed files with 44 additions and 21 deletions

View file

@ -536,21 +536,27 @@ void ID::DescribeReST(ODesc* d, bool roles_only) const {
d->NL();
d->PushIndent();
if ( ir->ic == INIT_FULL )
d->Add("``=``");
else if ( ir->ic == INIT_EXTRA )
d->Add("``+=``");
else if ( ir->ic == INIT_REMOVE )
d->Add("``-=``");
else
assert(false);
if ( ir->omit_value ) {
d->Add("<< Value omitted due to ``@docs_omit_value`` annotation >>");
d->NL();
}
else {
if ( ir->ic == INIT_FULL )
d->Add("``=``");
else if ( ir->ic == INIT_EXTRA )
d->Add("``+=``");
else if ( ir->ic == INIT_REMOVE )
d->Add("``-=``");
else
assert(false);
d->Add("::");
d->NL();
d->PushIndent();
d->Add(redef_str.data());
d->PopIndent();
d->PopIndent();
d->Add("::");
d->NL();
d->PushIndent();
d->Add(redef_str.data());
d->PopIndent();
d->PopIndent();
}
}
}
}