File tree Expand file tree Collapse file tree 6 files changed +38
-10
lines changed
share/mrdocs/addons/generator/adoc/partials
test-files/golden-tests/javadoc/relates Expand file tree Collapse file tree 6 files changed +38
-10
lines changed Original file line number Diff line number Diff line change 6868{{ #if symbol.usingDirectives }}
6969{{> symbol/members-table members =symbol.usingDirectives title =" Using Directives" }}
7070
71+ {{ /if }}
72+ {{! Related symbols }}
73+ {{ #if symbol.doc.related }}
74+ {{> symbol/members-table members =symbol.doc.related title =" Related functions" }}
75+
7176{{ /if }}
7277{{! Description }}
7378{{ #if symbol.doc.description }}
174179{{ /each }}
175180
176181{{ /if }}
177- {{! Related }}
178- {{ #if symbol.doc.related }}
179- {{ #> markup/dynamic-level-h }} Related{{ /markup/dynamic-level-h }}
180-
181- {{ #each symbol.doc.related }}
182- {{{ . }}}
183-
184- {{ /each }}
185-
186- {{ /if }}
Original file line number Diff line number Diff line change 287287DocVisitor::
288288operator ()(doc::Reference const & I) const
289289{
290+ if (I.Kind == doc::NodeKind::related)
291+ return ;
292+
290293 if (I.id == SymbolID::invalid)
291294 {
292295 return (*this )(static_cast <doc::Text const &>(I));
Original file line number Diff line number Diff line change 285285DocVisitor::
286286operator ()(doc::Reference const & I) const
287287{
288+ if (I.Kind == doc::NodeKind::related)
289+ return ;
290+
288291 if (I.id == SymbolID::invalid)
289292 {
290293 return (*this )(static_cast <doc::Text const &>(I));
Original file line number Diff line number Diff line change @@ -785,6 +785,9 @@ writeNode(doc::Node const& node)
785785 case doc::NodeKind::copied:
786786 writeCopied (dynamic_cast <doc::Copied const &>(node));
787787 break ;
788+ case doc::NodeKind::related:
789+ writeRelated (dynamic_cast <doc::Related const &>(node));
790+ break ;
788791 case doc::NodeKind::throws:
789792 writeThrows (dynamic_cast <doc::Throws const &>(node));
790793 break ;
@@ -841,6 +844,16 @@ writeCopied(
841844 });
842845}
843846
847+ void
848+ XMLWriter::
849+ writeRelated (
850+ doc::Related const & node)
851+ {
852+ tags_.write (" relates" , node.string , {
853+ { node.id }
854+ });
855+ }
856+
844857void
845858XMLWriter::
846859writeLink (
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ class XMLWriter
8989 void writeTParam (doc::TParam const & node);
9090 void writeReference (doc::Reference const & node);
9191 void writeCopied (doc::Copied const & node);
92+ void writeRelated (doc::Related const & node);
9293 void writeThrows (doc::Throws const & node);
9394 void writeDetails (doc::Details const & node, llvm::StringRef tag = " " );
9495 void writeSee (doc::See const & node, llvm::StringRef tag = " " );
Original file line number Diff line number Diff line change 1+ /* * A brief for A.
2+ */
3+ struct A { };
4+
5+ /* * A brief for B
6+ */
7+ struct B { };
8+
9+ /* * A brief for f.
10+
11+ @relates A
12+ */
13+ void f ();
You can’t perform that action at this time.
0 commit comments