diff --git a/include/mrdocs/Support/String.hpp b/include/mrdocs/Support/String.hpp
index b5a4767752..4aa9233e55 100644
--- a/include/mrdocs/Support/String.hpp
+++ b/include/mrdocs/Support/String.hpp
@@ -45,8 +45,10 @@ rtrim(std::string_view s) noexcept
{
auto it = s.end() - 1;
while(it > s.begin() && std::isspace(*it))
+ {
--it;
- return s.substr(0, it - s.begin());
+ }
+ return s.substr(0, it - s.begin() + 1);
}
/** Return the substring without leading and trailing horizontal whitespace.
diff --git a/src/lib/AST/ASTVisitor.cpp b/src/lib/AST/ASTVisitor.cpp
index 45e23cdf94..ed19f09405 100644
--- a/src/lib/AST/ASTVisitor.cpp
+++ b/src/lib/AST/ASTVisitor.cpp
@@ -1754,13 +1754,6 @@ generateJavadoc(
{
return false;
}
- // KRYSTIAN FIXME: clang ignores documentation comments
- // when there is a preprocessor directive between the end
- // of the comment and the declaration location. there are two
- // ways to fix this: either set the declaration begin location
- // to be before and preprocessor directives, or submit a patch
- // which disables this behavior (it's not entirely clear why
- // this check occurs anyways, so some investigation is needed)
parseJavadoc(javadoc, FC, D, config_, diags_);
return true;
}
diff --git a/src/lib/AST/ParseJavadoc.cpp b/src/lib/AST/ParseJavadoc.cpp
index 6a79506c99..8cc75a2740 100644
--- a/src/lib/AST/ParseJavadoc.cpp
+++ b/src/lib/AST/ParseJavadoc.cpp
@@ -16,6 +16,7 @@
#include ");
- for(auto const& it : RangeFor(I.children))
+ std::size_t i = 0;
+ for (auto it = I.children.begin(); it != I.children.end(); ++it)
{
- auto const n = dest_.size();
- doc::visit(*it.value, *this);
- // detect empty text blocks
- if(! it.last && dest_.size() > n)
+ auto& child = *it;
+ if (i == 0)
{
- // wrap past 80 cols
- if (dest_.size() < 80)
+ child->string = ltrim(child->string);
+ }
+ else if (auto prevIt = std::prev(it);
+ !(*prevIt)->string.empty() && !child->string.empty())
+ {
+ char const pc = (*(prevIt))->string.back();
+ char const cc = child->string.front();
+ if (!std::isspace(pc) && !std::isspace(cc))
{
dest_.push_back(' ');
- } else
- {
- dest_.push_back('\n');
}
}
+ if (i == I.children.size() - 1)
+ {
+ child->string = rtrim(child->string);
+ }
+ write(*child, *this);
+ i = i + 1;
}
- dest_.append("
{}", s);
+ fmt::format_to(std::back_inserter(dest_), "{}", HTMLEscape(I.string));
break;
case doc::Style::italic:
- fmt::format_to(std::back_inserter(dest_), "{}", s);
+ fmt::format_to(std::back_inserter(dest_), "{}", HTMLEscape(I.string));
break;
default:
MRDOCS_UNREACHABLE();
diff --git a/test-files/golden-tests/core/libcxx.adoc b/test-files/golden-tests/core/libcxx.adoc
index 101521c2b4..f92d2fa4e9 100644
--- a/test-files/golden-tests/core/libcxx.adoc
+++ b/test-files/golden-tests/core/libcxx.adoc
@@ -54,8 +54,7 @@ sqrt(T value);
=== Description
-This function calculates the square root of a
-given integral value using bit manipulation.
+This function calculates the square root of a given integral value using bit manipulation.
diff --git a/test-files/golden-tests/core/libcxx.html b/test-files/golden-tests/core/libcxx.html
index 24a9912e0b..1ed03ad8bf 100644
--- a/test-files/golden-tests/core/libcxx.html
+++ b/test-files/golden-tests/core/libcxx.html
@@ -32,7 +32,6 @@ sqrt Computes the square root of an integral value.
-Computes the square root of an integral value.
-This function calculates the square root of a given integral value using bit manipulation.
- +This function calculates the square root of a given integral value using bit manipulation.
ifthe input value is negative.
-The square root of the input value.
-The type of the input value. Must be an integral type.
-The integral value to compute the square root of.
-regular_ns A regular namespace with different filters for members
-see_below_ns A see-below namespace
-dependency_ns_alias Namespace alias to form the dependency on dependency_ns
-implementation_defined_ns_alias Namespace alias to form a dependency on the implementation-defined namespace
-see_below_ns_alias Namespace alias to form a dependency on the see-below namespace
-regular A regular symbol in the global namespace
-see_below A see-below symbol in the global namespace
-get_dependency A function to get a dependency symbol on the global namespace
-get_implementation_defined A function to get an implementation-defined symbol in the global namespace
-get_regular A function to get a regular symbol in the global namespace
-get_see_below A function to get a see-below symbol in the global namespace
-A regular namespace with different filters for members
-regular A symbol that passes the filters
-see_below A symbol that passes the see-below filter
-get_dependency A function to get an excluded symbol
-get_implementation_defined A function to get an implementation-defined symbol
-get_regular A function to get a regular symbol
-get_see_below A function to get a see-below symbol
-A symbol that passes the filters
-also_regular Child of a regular symbol extracted as regular
-The symbol should have a page as usual
-Child of a regular symbol extracted as regular
-regular_as_well Grandchild of a regular symbol extracted as regular
-Grandchild of a regular symbol extracted as regular
-A symbol that passes the filters and the see-below filter. The symbol should have a page as usual but, because it's a scope -and not a namespace, the members should not be listed on that page.
- +A symbol that passes the filters and the see-below filter. The symbol should have a page as usual but, because it's a scope and not a namespace, the members should not be listed on that page.
A function to get an excluded symbol
-When used in a function, only the symbol name should be shown. No links should be generated for this symbol.
- +When used in a function, only the symbol name should be shown. No links should be generated for this symbol.
A function to get an implementation-defined symbol
-When used in a function, the implementation-defined comment should replace the real type.
- -It's the responsibility of the function documentation to explain the implementation-defined symbol.
- +When used in a function, the implementation-defined comment should replace the real type.
+It's the responsibility of the function documentation to explain the implementation-defined symbol.
A function to get a regular symbol
-When used in a function, the symbol should be shown as usual with a link to the page.
- +When used in a function, the symbol should be shown as usual with a link to the page.
A function to get a see-below symbol
-When used in a function, the symbol name should be shown as usual. -The page for this symbol is what should be different because -the synopsis should say "See below" and the members are not -listed unless it's a namespace or the symbol has been explicitly -used as a dependency elsewhere.
- +When used in a function, the symbol name should be shown as usual. The page for this symbol is what should be different because the synopsis should say "See below" and the members are not listed unless it's a namespace or the symbol has been explicitly used as a dependency elsewhere.
A see-below namespace
-regular Regular symbol in a see-below namespace
-see_below See-below symbol in a see-below namespace
-get_dependency A function to get a dependency symbol in a see-below namespace
-get_implementation_defined A function to get an implementation-defined symbol in a see-below namespace
-All member symbols should become see-below. All members are traversed as see-below.
- -The documentation page for these symbols should include the see-below comment.
- +All member symbols should become see-below. All members are traversed as see-below.
+The documentation page for these symbols should include the see-below comment.
Regular symbol in a see-below namespace
-The symbol becomes see-below because the whole namespace is see-below.
- +The symbol becomes see-below because the whole namespace is see-below.
See-below symbol in a see-below namespace
-The symbol becomes see-below because the whole namespace is see-below and because it's explicitly marked as see-below.
- +The symbol becomes see-below because the whole namespace is see-below and because it's explicitly marked as see-below.
A function to get a dependency symbol in a see-below namespace
-The symbol should be extracted as a dependency because the exclude filter has precedence over the see-below filter. -Only included symbols can be promoted to see-below.
- -It's the responsibility of the function documentation to explain the dependency.
- +The symbol should be extracted as a dependency because the exclude filter has precedence over the see-below filter. Only included symbols can be promoted to see-below.
+It's the responsibility of the function documentation to explain the dependency.
A function to get an implementation-defined symbol in a see-below namespace
-When used in a function, the implementation-defined comment should replace the real type.
- -It's the responsibility of the function documentation to explain the implementation-defined symbol.
- +When used in a function, the implementation-defined comment should replace the real type.
+It's the responsibility of the function documentation to explain the implementation-defined symbol.
A regular symbol in the global namespace
-also_regular Child of a regular symbol: should be traversed as usual
-This symbol should have a page as usual.
-Child of a regular symbol: should be traversed as usual
-regular_as_well Grandchild of a regular symbol: should be traversed as usual
-A see-below symbol in the global namespace
-This symbol should have a page as usual but, because it's a scope -and not a namespace, the members should not be listed on that page.
- -The synopsis should say "See below".
- +This symbol should have a page as usual but, because it's a scope and not a namespace, the members should not be listed on that page.
+The synopsis should say "See below".
A function to get a dependency symbol on the global namespace
-The symbol should be extracted as a dependency but its members should not be traversed.
- +The symbol should be extracted as a dependency but its members should not be traversed.
A function to get an implementation-defined symbol in the global namespace
-When used in a function, the implementation-defined comment should replace the real type.
- -It's the responsibility of the function documentation to explain the implementation-defined symbol.
- +When used in a function, the implementation-defined comment should replace the real type.
+It's the responsibility of the function documentation to explain the implementation-defined symbol.
A function to get a regular symbol in the global namespace
-When used in a function, the symbol should be shown as usual with a link to the page.
- +When used in a function, the symbol should be shown as usual with a link to the page.
A function to get a see-below symbol in the global namespace
-When used in a function, the symbol name should be shown as usual. -The page for this symbol is what should be different because -the synopsis should say "See below" and the members are not -listed unless it's a namespace or the symbol has been explicitly -used as a dependency elsewhere.
- +When used in a function, the symbol name should be shown as usual. The page for this symbol is what should be different because the synopsis should say "See below" and the members are not listed unless it's a namespace or the symbol has been explicitly used as a dependency elsewhere.
Namespace alias to form the dependency on dependency_ns
-Namespace alias to form a dependency on the implementation-defined namespace
-Namespace alias to form a dependency on the see-below namespace
-The alias should be linked as usual and, because it's a namespace, -the members should be listed on the page.
- +The alias should be linked as usual and, because it's a namespace, the members should be listed on the page.
f5 brief bold it continues to the line.
- +f5 brief bold itcontinues to the line.
f6 brief
-brief bold it continues to the line.
- +brief bold itcontinues to the line.
brief
-many lined bold what will happen?
- +many lined bold what will happen?
f1 brief
-f2 brief
-f3 brief
-f4 brief x
-f5 br ief
- +f5 brief
f6 br ief
- +f6 brief
brief
-brief
-brief
-brief x
-br ief
- +brief
br ief
- +brief
br ief
- +brief
desc
-brief
+ + +<code.cpp>
+
+void
+f();
+
+
+This description contains code:
+
+// code comment
+// code comment
+template < class T >
+auto
+algorithm( T&& v = {} ) ->
+ typename T::result_type
+{
+ return v.result();
+}
+
+
+
+
+ // code comment
+ // code comment
+ template < class T >
+ auto
+ algorithm( T&& v = {} ) ->
+ typename T::result_type
+ {
+ return v.result();
+ }
+
+ f1 brief
-brief
-mrdocs hello
-f0 f0 brief
-f1 f1 brief
-g0 g0 brief
-g1 g1 brief
-h0 h0 brief
-h1 h1 brief
-f0 brief
-int
-f1 brief
-bool
-g0 brief
-one
-one
-g1 brief
-one
-two
-h0 brief
-one
-one
-h1 brief
-one
-two
-f4 brief
-brief
-a
-b
-c
-f1 brief
-brief
-a b c d
- +a b c d
Some text.
- +More text...
- -Another paragraph Next line
- +Another paragraph Next line
No-throw guarantee.
-first precondition
-second precondition
-first postcondition
--first precondition +first precondition
second precondition
diff --git a/test-files/golden-tests/javadoc/ref.adoc b/test-files/golden-tests/javadoc/ref.adoc
index a42d692fd7..3495e731e6 100644
--- a/test-files/golden-tests/javadoc/ref.adoc
+++ b/test-files/golden-tests/javadoc/ref.adoc
@@ -31,14 +31,12 @@
|
| <>
-| See
-xref:#A-f1[A::f1]
+| See xref:#A-f1[A::f1]
| <>
-| See
-xref:#F-operator_bitnot[F::operator˜]
+| See xref:#F-operator_bitnot[F::operator˜]
@@ -55,8 +53,7 @@ xref:#F-operator_bitnot[F::operator˜]
| Name | Description
| <>
-| See
-xref:#A-f1[f1]
+| See xref:#A-f1[f1]
@@ -74,8 +71,7 @@ xref:#A-f1[f1]
| Name | Description
| <>
-| See
-xref:#f0[f0]
+| See xref:#f0[f0]
@@ -85,8 +81,7 @@ xref:#f0[f0]
== <>::B
-See
-xref:#A-f1[f1]
+See xref:#A-f1[f1]
@@ -115,11 +110,9 @@ struct B;
=== Description
-See
-xref:#A-f1[A::f1]
+See xref:#A-f1[A::f1]
-See
-xref:#A-f1[::A::f1]
+See xref:#A-f1[::A::f1]
@@ -216,8 +209,7 @@ struct D
| Name | Description
| <>
-| See
-xref:#A-C-f3[f3]
+| See xref:#A-C-f3[f3]
@@ -238,8 +230,7 @@ xref:#A-C-f3[f3]
== <>::<>::E
-See
-xref:#A-C-f3[f3]
+See xref:#A-C-f3[f3]
@@ -259,11 +250,9 @@ struct E;
=== Description
-See
-xref:#A-D-f4[f4]
+See xref:#A-D-f4[f4]
-See
-xref:#A-C-f4[C::f4]
+See xref:#A-C-f4[C::f4]
@@ -286,8 +275,7 @@ f4();
== <>::f1
-See
-xref:#f0[f0]
+See xref:#f0[f0]
@@ -305,8 +293,7 @@ f1();
=== Description
-See
-xref:#f0[::f0]
+See xref:#f0[::f0]
@@ -977,8 +964,7 @@ f0();
== f5
-See
-xref:#A-f1[A::f1]
+See xref:#A-f1[A::f1]
@@ -996,8 +982,7 @@ f5();
=== Description
-See
-xref:#A-f1[::A::f1]
+See xref:#A-f1[::A::f1]
@@ -1005,8 +990,7 @@ xref:#A-f1[::A::f1]
== f6
-See
-xref:#F-operator_bitnot[F::operator˜]
+See xref:#F-operator_bitnot[F::operator˜]
@@ -1024,119 +1008,81 @@ f6();
=== Description
-See
-xref:#F-operator_comma[F::operator,]
+See xref:#F-operator_comma[F::operator,]
-See
-xref:#F-operator_call[F::operator()]
+See xref:#F-operator_call[F::operator()]
-See
-xref:#F-operator_subs[F::operator[]]
+See xref:#F-operator_subs[F::operator[]]
-See
-xref:#F-operator_plus[F::operator+]
+See xref:#F-operator_plus[F::operator+]
-See
-xref:#F-operator_inc[F::operator++]
+See xref:#F-operator_inc[F::operator++]
-See
-xref:#F-operator_plus_eq[F::operator+=]
+See xref:#F-operator_plus_eq[F::operator+=]
-See
-xref:#F-operator_bitand[F::operator&]
+See xref:#F-operator_bitand[F::operator&]
-See
-xref:#F-operator_and[F::operator&&]
+See xref:#F-operator_and[F::operator&&]
-See
-xref:#F-operator_and_eq[F::operator&=]
+See xref:#F-operator_and_eq[F::operator&=]
-See
-xref:#F-operator_bitor[F::operator|]
+See xref:#F-operator_bitor[F::operator|]
-See
-xref:#F-operator_or[F::operator||]
+See xref:#F-operator_or[F::operator||]
-See
-xref:#F-operator_or_eq[F::operator|=]
+See xref:#F-operator_or_eq[F::operator|=]
-See
-xref:#F-operator_minus[F::operator‐]
+See xref:#F-operator_minus[F::operator‐]
-See
-xref:#F-operator_dec[F::operator‐‐]
+See xref:#F-operator_dec[F::operator‐‐]
-See
-xref:#F-operator_minus_eq[F::operator‐=]
+See xref:#F-operator_minus_eq[F::operator‐=]
-See
-xref:#F-operator_ptr[F::operator‐>]
+See xref:#F-operator_ptr[F::operator‐>]
-See
-xref:#F-operator_ptrmem[F::operator‐>*]
+See xref:#F-operator_ptrmem[F::operator‐>*]
-See
-xref:#F-operator_lt[F::operator<]
+See xref:#F-operator_lt[F::operator<]
-See
-xref:#F-operator_lshift[F::operator<<]
+See xref:#F-operator_lshift[F::operator<<]
-See
-xref:#F-operator_lshift_eq[F::operator<<=]
+See xref:#F-operator_lshift_eq[F::operator<<=]
-See
-xref:#F-operator_le[F::operator<=]
+See xref:#F-operator_le[F::operator<=]
-See
-xref:#F-operator_3way[F::operator<=>]
+See xref:#F-operator_3way[F::operator<=>]
-See
-xref:#F-operator_gt[F::operator>]
+See xref:#F-operator_gt[F::operator>]
-See
-xref:#F-operator_rshift[F::operator>>]
+See xref:#F-operator_rshift[F::operator>>]
-See
-xref:#F-operator_rshift_eq[F::operator>>=]
+See xref:#F-operator_rshift_eq[F::operator>>=]
-See
-xref:#F-operator_ge[F::operator>=]
+See xref:#F-operator_ge[F::operator>=]
-See
-xref:#F-operator_star[F::operator*]
+See xref:#F-operator_star[F::operator*]
-See
-xref:#F-operator_star_eq[F::operator*=]
+See xref:#F-operator_star_eq[F::operator*=]
-See
-xref:#F-operator_mod[F::operator%]
+See xref:#F-operator_mod[F::operator%]
-See
-xref:#F-operator_mod_eq[F::operator%=]
+See xref:#F-operator_mod_eq[F::operator%=]
-See
-xref:#F-operator_slash[F::operator/]
+See xref:#F-operator_slash[F::operator/]
-See
-xref:#F-operator_slash_eq[F::operator/=]
+See xref:#F-operator_slash_eq[F::operator/=]
-See
-xref:#F-operator_xor[F::operatorˆ]
+See xref:#F-operator_xor[F::operatorˆ]
-See
-xref:#F-operator_xor_eq[F::operatorˆ=]
+See xref:#F-operator_xor_eq[F::operatorˆ=]
-See
-xref:#F-operator_assign[F::operator=]
+See xref:#F-operator_assign[F::operator=]
-See
-xref:#F-operator_eq[F::operator==]
+See xref:#F-operator_eq[F::operator==]
-See
-xref:#F-operator_not[F::operator!]
+See xref:#F-operator_not[F::operator!]
-See
-xref:#F-operator_not_eq[F::operator!=]
+See xref:#F-operator_not_eq[F::operator!=]
diff --git a/test-files/golden-tests/javadoc/ref.html b/test-files/golden-tests/javadoc/ref.html
index f319d5b97b..f75e0582c7 100644
--- a/test-files/golden-tests/javadoc/ref.html
+++ b/test-files/golden-tests/javadoc/ref.html
@@ -44,12 +44,10 @@ Functions
f0
-f5 See A::f1
-
+f5 See A::f1
-f6 See F::operator~
-
+f6 See F::operator~
@@ -68,8 +66,7 @@ Types
-B See f1
-
+B See f1
C
@@ -87,8 +84,7 @@ Functions
-f1 See f0
-
+f1 See f0
@@ -98,8 +94,7 @@ Functions
A::B
@@ -131,10 +126,8 @@ Member Functions
@@ -241,8 +234,7 @@ Types
-E See f3
-
+E See f3
@@ -267,8 +259,7 @@ Member Functions
A::D::E
@@ -287,10 +278,8 @@ Synopsis
@@ -315,8 +304,7 @@ Synopsis
@@ -1051,8 +1038,7 @@ Synopsis
@@ -1080,8 +1065,7 @@ Description
Description
-See F::operator,
-
-See F::operator()
-
-See F::operator[]
-
-See F::operator+
-
-See F::operator++
-
-See F::operator+=
-
-See F::operator&
-
-See F::operator&&
-
-See F::operator&=
-
-See F::operator|
-
-See F::operator||
-
-See F::operator|=
-
-See F::operator-
-
-See F::operator--
-
-See F::operator-=
-
-See F::operator->
-
-See F::operator->*
-
-See F::operator<
-
-See F::operator<<
-
-See F::operator<<=
-
-See F::operator<=
-
-See F::operator<=>
-
-See F::operator>
-
-See F::operator>>
-
-See F::operator>>=
-
-See F::operator>=
-
-See F::operator*
-
-See F::operator*=
-
-See F::operator%
-
-See F::operator%=
-
-See F::operator/
-
-See F::operator/=
-
-See F::operator^
-
-See F::operator^=
-
-See F::operator=
-
-See F::operator==
-
-See F::operator!
-
-See F::operator!=
-
+See F::operator,
+See F::operator()
+See F::operator[]
+See F::operator+
+See F::operator++
+See F::operator+=
+See F::operator&
+See F::operator&&
+See F::operator&=
+See F::operator|
+See F::operator||
+See F::operator|=
+See F::operator-
+See F::operator--
+See F::operator-=
+See F::operator->
+See F::operator->*
+See F::operator<
+See F::operator<<
+See F::operator<<=
+See F::operator<=
+See F::operator<=>
+See F::operator>
+See F::operator>>
+See F::operator>>=
+See F::operator>=
+See F::operator*
+See F::operator*=
+See F::operator%
+See F::operator%=
+See F::operator/
+See F::operator/=
+See F::operator^
+See F::operator^=
+See F::operator=
+See F::operator==
+See F::operator!
+See F::operator!=
diff --git a/test-files/golden-tests/javadoc/ref.xml b/test-files/golden-tests/javadoc/ref.xml
index e8547848f1..3d8bbe1e41 100644
--- a/test-files/golden-tests/javadoc/ref.xml
+++ b/test-files/golden-tests/javadoc/ref.xml
@@ -16,6 +16,7 @@
See
::f0
+
@@ -35,6 +36,7 @@
See
::A::f1
+
@@ -73,6 +75,7 @@
See
C::f4
+
diff --git a/test-files/golden-tests/javadoc/styled.adoc b/test-files/golden-tests/javadoc/styled.adoc
new file mode 100644
index 0000000000..32fca814c5
--- /dev/null
+++ b/test-files/golden-tests/javadoc/styled.adoc
@@ -0,0 +1,91 @@
+= Reference
+:mrdocs:
+
+[#index]
+== Global namespace
+
+
+=== Types
+
+[cols=2]
+|===
+| Name | Description
+
+| <>
+| Brief for A
+
+
+
+|===
+
+[#A]
+== A
+
+
+Brief for A
+
+
+
+=== Synopsis
+
+
+Declared in `<styled.cpp>`
+
+[source,cpp,subs="verbatim,replacements,macros,-callouts"]
+----
+struct A;
+----
+
+=== Member Functions
+
+[cols=2]
+|===
+| Name | Description
+
+| <>
+| Compare function
+
+
+
+|===
+
+
+
+=== Description
+
+
+Paragraph with `code`, *bold* text, and _italic_ text.
+
+We can also escape these markers: `, *, and _.
+
+
+
+[#A-compare]
+== <>::compare
+
+
+Compare function
+
+
+
+=== Synopsis
+
+
+Declared in `<styled.cpp>`
+
+[source,cpp,subs="verbatim,replacements,macros,-callouts"]
+----
+int
+compare(<> const& other) const noexcept;
+----
+
+=== Return Value
+
+
+`‐1` if `*this < other`, `0` if `this == other`, and 1 if `this > other`.
+
+
+
+
+
+[.small]#Created with https://www.mrdocs.com[MrDocs]#
diff --git a/test-files/golden-tests/javadoc/styled.cpp b/test-files/golden-tests/javadoc/styled.cpp
new file mode 100644
index 0000000000..07032ed5d7
--- /dev/null
+++ b/test-files/golden-tests/javadoc/styled.cpp
@@ -0,0 +1,16 @@
+/** Brief for A
+
+ Paragraph with `code`, *bold* text, and _italic_ text.
+
+ We can also escape these markers: \`, \*, and \_.
+
+ */
+struct A {
+ /** Compare function
+
+ @return `-1` if `*this < other`, `0` if
+ `this == other`, and 1 if `this > other`.
+ */
+ int compare(A const& other) const noexcept;
+};
+
diff --git a/test-files/golden-tests/javadoc/styled.html b/test-files/golden-tests/javadoc/styled.html
new file mode 100644
index 0000000000..97ce9b64dc
--- /dev/null
+++ b/test-files/golden-tests/javadoc/styled.html
@@ -0,0 +1,102 @@
+
+
+Reference
+
+
+
+Reference
+
+
+
+A
+
+Brief for A
+
+
+
+
+
+Synopsis
+
+Declared in <styled.cpp>
+
+
+struct A;
+
+
+
+Member Functions
+
+
+
+Name Description
+
+
+
+
+compare Compare function
+
+
+
+
+
+
+
+Description
+Paragraph with code , bold text, and italic text.
+We can also escape these markers: `, *, and _.
+
+
+
+
+
+
+
+
+Created with MrDocs
+
+
+
\ No newline at end of file
diff --git a/test-files/golden-tests/javadoc/styled.xml b/test-files/golden-tests/javadoc/styled.xml
new file mode 100644
index 0000000000..6d5bab52b9
--- /dev/null
+++ b/test-files/golden-tests/javadoc/styled.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+ Brief for A
+
+
+ Paragraph with
+ code
+ ,
+ bold
+ text, and
+ italic
+ text.
+
+
+ We can also escape these markers: `, *, and _.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Compare function
+
+
+ -1
+ if
+ *this < other
+ ,
+ 0
+ if
+ this == other
+ , and 1 if
+ this > other
+ .
+
+
+
+
+
+
diff --git a/test-files/golden-tests/metadata/enum.html b/test-files/golden-tests/metadata/enum.html
index c4c03ad6a7..ac3ce2dcc7 100644
--- a/test-files/golden-tests/metadata/enum.html
+++ b/test-files/golden-tests/metadata/enum.html
@@ -20,13 +20,11 @@ Enums
E0 E0 brief.
-
E1
E2 E2 brief.
-
E3
@@ -40,7 +38,6 @@ E0
E0 brief.
-
@@ -66,13 +63,11 @@ Members
e0
e0 brief.
-
e1
e1 brief.
-
@@ -83,7 +78,6 @@ Description
E0 description.
-
@@ -129,7 +123,6 @@ E2
E2 brief.
-
@@ -155,13 +148,11 @@ Members
e4
e4 brief.
-
e5
e5 brief.
-
@@ -172,7 +163,6 @@ Description
E2 description.
-
diff --git a/test-files/golden-tests/metadata/friend-1.html b/test-files/golden-tests/metadata/friend-1.html
index 91314f00b4..fe295febde 100644
--- a/test-files/golden-tests/metadata/friend-1.html
+++ b/test-files/golden-tests/metadata/friend-1.html
@@ -32,7 +32,6 @@ Functions
f f
-
@@ -62,7 +61,6 @@ Friends
f f
-
@@ -76,7 +74,6 @@ f
f
-
@@ -99,7 +96,6 @@ f
f
-
diff --git a/test-files/golden-tests/metadata/friend-2.html b/test-files/golden-tests/metadata/friend-2.html
index fc769c11be..6960891a38 100644
--- a/test-files/golden-tests/metadata/friend-2.html
+++ b/test-files/golden-tests/metadata/friend-2.html
@@ -32,7 +32,6 @@ Functions
f f
-
@@ -62,7 +61,6 @@ Friends
f f
-
@@ -76,7 +74,6 @@ f
f
-
@@ -99,7 +96,6 @@ f
f
-
diff --git a/test-files/golden-tests/metadata/friend-3.html b/test-files/golden-tests/metadata/friend-3.html
index c4d969f50a..af920d7ea4 100644
--- a/test-files/golden-tests/metadata/friend-3.html
+++ b/test-files/golden-tests/metadata/friend-3.html
@@ -33,7 +33,6 @@ Functions
f T::f
-
@@ -63,7 +62,6 @@ Friends
f T::f
-
@@ -77,7 +75,6 @@ f
T::f
-
@@ -146,7 +143,6 @@ f
T::f
-
diff --git a/test-files/golden-tests/metadata/friend-4.html b/test-files/golden-tests/metadata/friend-4.html
index c3f0f90da6..8699e78050 100644
--- a/test-files/golden-tests/metadata/friend-4.html
+++ b/test-files/golden-tests/metadata/friend-4.html
@@ -33,7 +33,6 @@ Functions
f U::f
-
@@ -109,7 +108,6 @@ Friends
f U::f
-
@@ -123,7 +121,6 @@ f
U::f
-
@@ -146,7 +143,6 @@ f
U::f
-
diff --git a/test-files/golden-tests/metadata/friend-5.html b/test-files/golden-tests/metadata/friend-5.html
index 450f2e15c4..3ca0d29d1e 100644
--- a/test-files/golden-tests/metadata/friend-5.html
+++ b/test-files/golden-tests/metadata/friend-5.html
@@ -33,7 +33,6 @@ Functions
f f
-
@@ -137,7 +136,6 @@ f
f
-
diff --git a/test-files/golden-tests/metadata/friend-6.html b/test-files/golden-tests/metadata/friend-6.html
index 0fe3956cc4..589f973dc8 100644
--- a/test-files/golden-tests/metadata/friend-6.html
+++ b/test-files/golden-tests/metadata/friend-6.html
@@ -20,15 +20,12 @@ Types
T Struct T brief
-
U Struct U brief
-
V Struct V brief
-
Z
@@ -42,7 +39,6 @@ T
Struct T brief
-
@@ -66,11 +62,9 @@ Friends
class Z Friend class Z brief
-
int Friend int brief
-
@@ -84,7 +78,6 @@ Z
Friend class Z brief
-
@@ -105,7 +98,6 @@ int
Friend int brief
-
@@ -126,7 +118,6 @@ U
Struct U brief
-
@@ -185,7 +174,6 @@ V
Struct V brief
-
@@ -209,7 +197,6 @@ Friends
struct U Friend struct U brief
-
@@ -223,7 +210,6 @@ U
Friend struct U brief
-
diff --git a/test-files/golden-tests/metadata/record-1.html b/test-files/golden-tests/metadata/record-1.html
index 9c4a511da0..e595dbcfca 100644
--- a/test-files/golden-tests/metadata/record-1.html
+++ b/test-files/golden-tests/metadata/record-1.html
@@ -75,15 +75,12 @@ Protected Member Functions
g1 brief-g1
-
g2 brief-g2
-
g3 brief-g3
-
@@ -144,7 +141,6 @@ T::g1
brief-g1
-
@@ -163,7 +159,6 @@ Description
desc
-
@@ -173,7 +168,6 @@ T::g2
brief-g2
-
@@ -191,7 +185,6 @@ Synopsis
Return Value
the number 2
-
@@ -201,7 +194,6 @@ T::g3
brief-g3
-
@@ -219,7 +211,6 @@ Synopsis
Return Value
the separator
-
Parameters
@@ -234,7 +225,6 @@ Parameters
x
any old number
-
diff --git a/test-files/golden-tests/metadata/record-1.xml b/test-files/golden-tests/metadata/record-1.xml
index 354d4bce7e..7902ebbe4d 100644
--- a/test-files/golden-tests/metadata/record-1.xml
+++ b/test-files/golden-tests/metadata/record-1.xml
@@ -65,7 +65,7 @@
brief-g3
- the separator
+ the separator
any old number
diff --git a/test-files/golden-tests/snippets/distance.adoc b/test-files/golden-tests/snippets/distance.adoc
index 63d7ea3ef7..8278ee917c 100644
--- a/test-files/golden-tests/snippets/distance.adoc
+++ b/test-files/golden-tests/snippets/distance.adoc
@@ -44,8 +44,7 @@ distance(
=== Description
-This function returns the distance between two points
-according to the Euclidean distance formula.
+This function returns the distance between two points according to the Euclidean distance formula.
diff --git a/test-files/golden-tests/snippets/distance.html b/test-files/golden-tests/snippets/distance.html
index 49195fd99d..6519478515 100644
--- a/test-files/golden-tests/snippets/distance.html
+++ b/test-files/golden-tests/snippets/distance.html
@@ -20,7 +20,6 @@ Functions
distance Return the distance between two points
-
@@ -32,7 +31,6 @@ distance
Return the distance between two points
-
@@ -52,8 +50,7 @@ Synopsis
Description
-This function returns the distance between two points according to the Euclidean distance formula.
-
+This function returns the distance between two points according to the Euclidean distance formula.
@@ -61,7 +58,6 @@ Description
Return Value
The distance between the two points
-
Parameters
@@ -76,25 +72,21 @@ Parameters
x0
The x-coordinate of the first point
-
y0
The y-coordinate of the first point
-
x1
The x-coordinate of the second point
-
y1
The y-coordinate of the second point
-
diff --git a/test-files/golden-tests/snippets/distance.xml b/test-files/golden-tests/snippets/distance.xml
index d130a2e831..0768e566a7 100644
--- a/test-files/golden-tests/snippets/distance.xml
+++ b/test-files/golden-tests/snippets/distance.xml
@@ -24,20 +24,19 @@
Return the distance between two points
- This function returns the distance between two points
- according to the Euclidean distance formula.
+ This function returns the distance between two points according to the Euclidean distance formula.
- The x-coordinate of the first point
+ The x-coordinate of the first point
- The y-coordinate of the first point
+ The y-coordinate of the first point
- The x-coordinate of the second point
+ The x-coordinate of the second point
- The y-coordinate of the second point
+ The y-coordinate of the second point
The distance between the two points
diff --git a/test-files/golden-tests/snippets/is_prime.html b/test-files/golden-tests/snippets/is_prime.html
index c9e4e4ec7f..7b47fa30fb 100644
--- a/test-files/golden-tests/snippets/is_prime.html
+++ b/test-files/golden-tests/snippets/is_prime.html
@@ -20,7 +20,6 @@ Functions
is_prime Return true if a number is prime.
-
@@ -32,7 +31,6 @@ is_prime
Return true if a number is prime.
-
@@ -51,13 +49,11 @@ Description
Linear in n.
-
Return Value
Whether or not n is prime.
-
Parameters
@@ -72,7 +68,6 @@ Parameters
n
The number to test
-
diff --git a/test-files/golden-tests/snippets/is_prime.xml b/test-files/golden-tests/snippets/is_prime.xml
index a35fa58c87..cd4d30651e 100644
--- a/test-files/golden-tests/snippets/is_prime.xml
+++ b/test-files/golden-tests/snippets/is_prime.xml
@@ -18,7 +18,7 @@
Linear in n.
- Whether or not n is prime.
+ Whether or not n is prime.
The number to test
diff --git a/test-files/golden-tests/snippets/sqrt.adoc b/test-files/golden-tests/snippets/sqrt.adoc
index d2a25dfb38..ab257e8e5c 100644
--- a/test-files/golden-tests/snippets/sqrt.adoc
+++ b/test-files/golden-tests/snippets/sqrt.adoc
@@ -54,8 +54,7 @@ sqrt(T value);
=== Description
-This function calculates the square root of a
-given integral value using bit manipulation.
+This function calculates the square root of a given integral value using bit manipulation.
diff --git a/test-files/golden-tests/snippets/sqrt.html b/test-files/golden-tests/snippets/sqrt.html
index fd35b24788..bea9414900 100644
--- a/test-files/golden-tests/snippets/sqrt.html
+++ b/test-files/golden-tests/snippets/sqrt.html
@@ -32,7 +32,6 @@ Functions
sqrt Computes the square root of an integral value.
-
@@ -49,7 +48,6 @@ sqrt
Computes the square root of an integral value.
-
@@ -66,8 +64,7 @@ Synopsis
Description
-This function calculates the square root of a given integral value using bit manipulation.
-
+This function calculates the square root of a given integral value using bit manipulation.
@@ -84,7 +81,6 @@ Exceptions
if
the input value is negative.
-
@@ -94,7 +90,6 @@ Exceptions
Return Value
The square root of the input value.
-
Template Parameters
@@ -109,7 +104,6 @@ Template Parameters
T
The type of the input value. Must be an integral type.
-
@@ -128,7 +122,6 @@ Parameters
value
The integral value to compute the square root of.
-
diff --git a/test-files/golden-tests/snippets/sqrt.xml b/test-files/golden-tests/snippets/sqrt.xml
index 4090956cd8..cb0db2e2ec 100644
--- a/test-files/golden-tests/snippets/sqrt.xml
+++ b/test-files/golden-tests/snippets/sqrt.xml
@@ -19,17 +19,16 @@
Computes the square root of an integral value.
- This function calculates the square root of a
- given integral value using bit manipulation.
+ This function calculates the square root of a given integral value using bit manipulation.
the input value is negative.
- The type of the input value. Must be an integral type.
+ The type of the input value. Must be an integral type.
- The integral value to compute the square root of.
+ The integral value to compute the square root of.
The square root of the input value.
diff --git a/test-files/golden-tests/snippets/terminate.html b/test-files/golden-tests/snippets/terminate.html
index c9f52b58f0..760731a6c2 100644
--- a/test-files/golden-tests/snippets/terminate.html
+++ b/test-files/golden-tests/snippets/terminate.html
@@ -20,7 +20,6 @@ Functions
terminate Exit the program.
-
@@ -32,7 +31,6 @@ terminate
Exit the program.
-
@@ -50,11 +48,9 @@ Synopsis
Description
The program will end immediately.
-
NOTE
This function does not return.
-