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 #include #include +#include #include #include #include @@ -397,22 +398,183 @@ ensureUTF8( return s; } +/* Parse the inline content of a text + + This function takes a string from a comment + and parses it into a sequence of styled text + nodes. + + The string may contain inline commands that + change the style of the text: + + Regular text is stored as a doc::Text. + Styled text is stored as a doc::Styled. + + The styles can be one of: mono, bold, or italic. + + The tags "`", "*", and "_" are used to indicate + the start and end of styled text. They can be + escaped by prefixing them with a backslash. + + */ +doc::List +parseStyled(StringRef s) +{ + doc::List result; + std::string currentText; + doc::Style currentStyle = doc::Style::none; + bool escapeNext = false; + + auto isStyleMarker = [](char c) { + return c == '`' || c == '*' || c == '_'; + }; + + auto flushCurrentText = [&]() { + if (!currentText.empty()) { + if (currentStyle == doc::Style::none) { + bool const lastIsSame = + !result.empty() && + result.back()->kind == doc::Kind::text; + if (lastIsSame) + { + auto& lastText = static_cast(*result.back()); + lastText.string.append(currentText); + } + else + { + result.emplace_back(std::make_unique(std::move(currentText))); + } + } else { + bool const lastIsSame = + !result.empty() && + result.back()->kind == doc::Kind::styled && + static_cast(*result.back()).style == currentStyle; + if (lastIsSame) + { + auto& lastStyled = static_cast(*result.back()); + lastStyled.string.append(currentText); + } + else + { + result.emplace_back(std::make_unique(std::move(currentText), currentStyle)); + } + } + currentText.clear(); + } + }; + + auto isPunctuationOrSpace = [](char c) { + return std::isspace(c) || std::ispunct(c); + }; + + for (std::size_t i = 0; i < s.size(); ++i) { + char c = s[i]; + if (escapeNext) { + currentText.push_back(c); + escapeNext = false; + } else if (c == '\\') { + escapeNext = true; + } else if (isStyleMarker(c)) { + bool const atWordBoundary = + (currentStyle == doc::Style::none && ((i == 0) || isPunctuationOrSpace(s[i - 1]))) || + (currentStyle != doc::Style::none && ((i == s.size() - 1) || isPunctuationOrSpace(s[i + 1]))); + if (atWordBoundary) { + flushCurrentText(); + if (c == '`') { + currentStyle = (currentStyle == doc::Style::mono) ? doc::Style::none : doc::Style::mono; + } else if (c == '*') { + currentStyle = (currentStyle == doc::Style::bold) ? doc::Style::none : doc::Style::bold; + } else if (c == '_') { + currentStyle = (currentStyle == doc::Style::italic) ? doc::Style::none : doc::Style::italic; + } + } else { + currentText.push_back(c); + } + } else { + currentText.push_back(c); + } + } + + // Whatever style we started, we should end it because + // we reached the end of the string without a closing + // marker. + currentStyle = doc::Style::none; + flushCurrentText(); + + return result; +} + void JavadocVisitor:: visitChildren( Comment const* C) { - auto const it0 = it_; - auto const end0 = end_; - it_ = C->child_begin(); - end_ = C->child_end(); + ScopeExitRestore s1(it_, C->child_begin()); + ScopeExitRestore s2(end_, C->child_end()); while(it_ != end_) { visit(*it_); ++it_; // must happen after } - it_ = it0; - end_ = end0; + + if (!block_) + { + return; + } + + bool const isVerbatim = block_->kind == doc::Kind::code; + if (isVerbatim) + { + return; + } + + // Merge consecutive plain text nodes in the current block + auto it = block_->children.begin(); + while(it != block_->children.end()) + { + auto& child = *it; + if (child.get()->kind == doc::Kind::text) + { + auto* text = dynamic_cast(child.get()); + MRDOCS_ASSERT(text); + auto next = std::next(it); + if(next != block_->children.end()) + { + if(next->get()->kind == doc::Kind::text) + { + auto* next_text = dynamic_cast(next->get()); + MRDOCS_ASSERT(next_text); + text->string.append(next_text->string); + it = block_->children.erase(next); + continue; + } + } + } + ++it; + } + + // Parse any Text nodes for styled text + for (auto it = block_->children.begin(); it != block_->children.end();) + { + MRDOCS_ASSERT(it->get()); + if (it->get()->kind == doc::Kind::text) + { + auto* text = dynamic_cast(it->get()); + auto styledText = parseStyled(text->string); + std::size_t const offset = std::distance(block_->children.begin(), it); + std::size_t const n = styledText.size(); + block_->children.erase(it); + block_->children.insert( + block_->children.begin() + offset, + std::make_move_iterator(styledText.begin()), + std::make_move_iterator(styledText.end())); + it = block_->children.begin() + offset + n; + } + else + { + ++it; + } + } } //------------------------------------------------ @@ -462,16 +624,18 @@ visitTextComment( // If this is the first text comment in the // paragraph then remove all the leading space. // Otherwise, just remove the trailing space. - if(block_->children.empty()) + if (block_->children.empty()) + { s = s.ltrim(); - else - s = s.rtrim(); + } // Only insert non-empty text nodes if(! s.empty()) + { emplaceText( C->hasTrailingNewline(), ensureUTF8(s.str())); + } } Expected diff --git a/src/lib/Gen/adoc/DocVisitor.cpp b/src/lib/Gen/adoc/DocVisitor.cpp index 082edd30e6..12c1335553 100644 --- a/src/lib/Gen/adoc/DocVisitor.cpp +++ b/src/lib/Gen/adoc/DocVisitor.cpp @@ -18,6 +18,7 @@ #include #include #include +#include namespace clang::mrdocs::adoc { @@ -65,7 +66,7 @@ operator()( doc::visit(*it.value, [&](T const& text) { - if constexpr(std::is_same_v) + if constexpr(std::derived_from) { if(! text.string.empty()) { @@ -89,7 +90,7 @@ DocVisitor:: operator()( doc::Heading const& I) const { - fmt::format_to(ins_, "\n=== {}\n", AdocEscape(I.string)); + fmt::format_to(ins_, "\n=== {}\n\n", AdocEscape(I.string)); } // Also handles doc::Brief @@ -103,15 +104,23 @@ operator()( { return; } - bool non_empty = write(*children.front(), *this); - for(auto const& child : children.subspan(1)) + + std::size_t i = 0; + for (auto it = children.begin(); it != children.end(); ++it) { - if (non_empty) + auto& child = *it; + if (i == 0) { - dest_.push_back('\n'); + child->string = ltrim(child->string); } - non_empty = write(*child, *this); + if (i == children.size() - 1) + { + child->string = rtrim(child->string); + } + write(*child, *this); + i = i + 1; } + dest_.push_back('\n'); dest_.push_back('\n'); } @@ -188,37 +197,32 @@ void DocVisitor:: operator()(doc::Text const& I) const { - // Asciidoc text must not have leading - // else they can be rendered up as code. - std::string_view s = trim(I.string); - // Render empty lines as paragraph delimiters. - if (s.empty()) + if (I.string.empty()) + { + dest_.append("\n\n"); + } else { - s = "\n"; + dest_.append(AdocEscape(I.string)); } - dest_.append(AdocEscape(s)); } void DocVisitor:: operator()(doc::Styled const& I) const { - // VFALCO We need to apply Asciidoc escaping - // depending on the contents of the string. - std::string_view s = trim(I.string); switch(I.style) { case doc::Style::none: - dest_.append(s); + dest_.append(AdocEscape(I.string)); break; case doc::Style::bold: - fmt::format_to(std::back_inserter(dest_), "*{}*", s); + fmt::format_to(std::back_inserter(dest_), "*{}*", AdocEscape(I.string)); break; case doc::Style::mono: - fmt::format_to(std::back_inserter(dest_), "`{}`", s); + fmt::format_to(std::back_inserter(dest_), "`{}`", AdocEscape(I.string)); break; case doc::Style::italic: - fmt::format_to(std::back_inserter(dest_), "_{}_", s); + fmt::format_to(std::back_inserter(dest_), "_{}_", AdocEscape(I.string)); break; default: MRDOCS_UNREACHABLE(); diff --git a/src/lib/Gen/html/DocVisitor.cpp b/src/lib/Gen/html/DocVisitor.cpp index fedce22901..fed73952ee 100644 --- a/src/lib/Gen/html/DocVisitor.cpp +++ b/src/lib/Gen/html/DocVisitor.cpp @@ -12,6 +12,7 @@ #include "DocVisitor.hpp" #include "lib/Support/Radix.hpp" +#include "mrdocs/Support/Handlebars.hpp" #include #include #include @@ -99,25 +100,38 @@ DocVisitor:: operator()( doc::Paragraph const& I) const { + if (I.children.empty()) + { + return; + } + dest_.append("

"); - 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("

\n\n"); + dest_.append("

\n"); } void @@ -202,28 +216,26 @@ void DocVisitor:: operator()(doc::Text const& I) const { - std::string_view s = trim(I.string); - fmt::format_to(std::back_inserter(dest_), "{}", s); + fmt::format_to(std::back_inserter(dest_), "{}", HTMLEscape(I.string)); } void DocVisitor:: operator()(doc::Styled const& I) const { - std::string_view s = trim(I.string); switch(I.style) { case doc::Style::none: - dest_.append(s); + dest_.append(I.string); break; case doc::Style::bold: - fmt::format_to(std::back_inserter(dest_), "{}", s); + fmt::format_to(std::back_inserter(dest_), "{}", HTMLEscape(I.string)); break; case doc::Style::mono: - fmt::format_to(std::back_inserter(dest_), "{}", 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 @@

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/core/libcxx.xml b/test-files/golden-tests/core/libcxx.xml index 9f6332e65d..10a6d96959 100644 --- a/test-files/golden-tests/core/libcxx.xml +++ b/test-files/golden-tests/core/libcxx.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/filters/symbol-name/extraction-mode.adoc b/test-files/golden-tests/filters/symbol-name/extraction-mode.adoc index 9ee98b3f6b..a5c96028c8 100644 --- a/test-files/golden-tests/filters/symbol-name/extraction-mode.adoc +++ b/test-files/golden-tests/filters/symbol-name/extraction-mode.adoc @@ -260,9 +260,7 @@ struct see_below { /* see-below */ }; === Description -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. @@ -288,8 +286,7 @@ get_dependency(); === Description -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. @@ -315,11 +312,9 @@ get_implementation_defined(); === Description -When used in a function, the implementation‐defined -comment should replace the real type. +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. +It's the responsibility of the function documentation to explain the implementation‐defined symbol. @@ -345,8 +340,7 @@ get_regular(); === Description -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. @@ -372,11 +366,7 @@ get_see_below(); === Description -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. @@ -426,11 +416,9 @@ A see‐below namespace === Description -All member symbols should become see‐below. All members are -traversed as see‐below. +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. +The documentation page for these symbols should include the see‐below comment. @@ -458,8 +446,7 @@ struct regular { /* see-below */ }; === Description -The symbol becomes see‐below because the whole namespace -is see‐below. +The symbol becomes see‐below because the whole namespace is see‐below. @@ -487,8 +474,7 @@ struct see_below { /* see-below */ }; === Description -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. @@ -514,12 +500,9 @@ get_dependency(); === Description -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. +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. +It's the responsibility of the function documentation to explain the dependency. @@ -545,11 +528,9 @@ get_implementation_defined(); === Description -When used in a function, the implementation‐defined -comment should replace the real type. +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. +It's the responsibility of the function documentation to explain the implementation‐defined symbol. @@ -671,8 +652,7 @@ struct see_below { /* see-below */ }; === Description -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. +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". @@ -700,8 +680,7 @@ get_dependency(); === Description -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. @@ -727,11 +706,9 @@ get_implementation_defined(); === Description -When used in a function, the implementation‐defined -comment should replace the real type. +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. +It's the responsibility of the function documentation to explain the implementation‐defined symbol. @@ -757,8 +734,7 @@ get_regular(); === Description -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. @@ -784,11 +760,7 @@ get_see_below(); === Description -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. @@ -849,8 +821,7 @@ namespace see_below_ns_alias = <Namespaces regular_ns

A regular namespace with different filters for members

- see_below_ns

A see-below namespace

- @@ -39,15 +37,12 @@

Namespace Aliases

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

- @@ -62,11 +57,9 @@

Types

regular

A regular symbol in the global namespace

- see_below

A see-below symbol in the global namespace

- @@ -81,19 +74,15 @@

Functions

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

- @@ -105,7 +94,6 @@

regular_ns

A regular namespace with different filters for members

-

Types

@@ -119,11 +107,9 @@

Types

regular

A symbol that passes the filters

- see_below

A symbol that passes the see-below filter

- @@ -138,19 +124,15 @@

Functions

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

- @@ -162,7 +144,6 @@

regular_ns::regular

A symbol that passes the filters

-
@@ -186,7 +167,6 @@

Types

also_regular

Child of a regular symbol extracted as regular

- @@ -197,7 +177,6 @@

Description

The symbol should have a page as usual

-
@@ -207,7 +186,6 @@

regular_ns::<

Child of a regular symbol extracted as regular

-

@@ -231,7 +209,6 @@

Types

regular_as_well

Grandchild of a regular symbol extracted as regular

- @@ -245,7 +222,6 @@

r

Grandchild of a regular symbol extracted as regular

-

@@ -268,7 +244,6 @@

regular_ns::see_belowA symbol that passes the see-below filter

-

@@ -285,9 +260,7 @@

Synopsis

Description

-

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.

@@ -299,7 +272,6 @@

regular_ns::get_dep

A function to get an excluded symbol

-

@@ -315,8 +287,7 @@

Synopsis

Description

-

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.

@@ -328,7 +299,6 @@

regular_ns<

A function to get an implementation-defined symbol

-
@@ -344,10 +314,8 @@

Synopsis

Description

-

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.

@@ -359,7 +327,6 @@

regular_ns::get_regula

A function to get a regular symbol

-
@@ -375,8 +342,7 @@

Synopsis

Description

-

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.

@@ -388,7 +354,6 @@

regular_ns::get_see_

A function to get a see-below symbol

-
@@ -404,12 +369,7 @@

Synopsis

Description

-

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.

@@ -421,7 +381,6 @@

see_below_ns

A see-below namespace

-

Types

@@ -435,11 +394,9 @@

Types

regular

Regular symbol in a see-below namespace

- see_below

See-below symbol in a see-below namespace

- @@ -454,20 +411,16 @@

Functions

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

-

Description

-

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.

@@ -479,7 +432,6 @@

see_below_ns::regular<

Regular symbol in a see-below namespace

-
@@ -496,8 +448,7 @@

Synopsis

Description

-

The symbol becomes see-below because the whole namespace is see-below.

- +

The symbol becomes see-below because the whole namespace is see-below.

@@ -509,7 +460,6 @@

see_below_ns::see_be

See-below symbol in a see-below namespace

-

@@ -526,8 +476,7 @@

Synopsis

Description

-

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.

@@ -539,7 +488,6 @@

see_below_ns::g

A function to get a dependency symbol in a see-below namespace

-

@@ -555,11 +503,8 @@

Synopsis

Description

-

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.

@@ -571,7 +516,6 @@

see_bel

A function to get an implementation-defined symbol in a see-below namespace

-
@@ -587,10 +531,8 @@

Synopsis

Description

-

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.

@@ -602,7 +544,6 @@

regular

A regular symbol in the global namespace

-
@@ -626,7 +567,6 @@

Types

also_regular

Child of a regular symbol: should be traversed as usual

- @@ -637,7 +577,6 @@

Description

This symbol should have a page as usual.

-
@@ -647,7 +586,6 @@

regular::also_regular

Child of a regular symbol: should be traversed as usual

-
@@ -671,7 +609,6 @@

Types

regular_as_well

Grandchild of a regular symbol: should be traversed as usual

- @@ -685,7 +622,6 @@

regular::Grandchild of a regular symbol: should be traversed as usual

-

@@ -708,7 +644,6 @@

see_below

A see-below symbol in the global namespace

-
@@ -725,11 +660,8 @@

Synopsis

Description

-

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".

@@ -741,7 +673,6 @@

get_dependency

A function to get a dependency symbol on the global namespace

-
@@ -757,8 +688,7 @@

Synopsis

Description

-

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.

@@ -770,7 +700,6 @@

get_implementation_defined

A function to get an implementation-defined symbol in the global namespace

-
@@ -786,10 +715,8 @@

Synopsis

Description

-

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.

@@ -801,7 +728,6 @@

get_regular

A function to get a regular symbol in the global namespace

-
@@ -817,8 +743,7 @@

Synopsis

Description

-

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.

@@ -830,7 +755,6 @@

get_see_below

A function to get a see-below symbol in the global namespace

-
@@ -846,12 +770,7 @@

Synopsis

Description

-

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.

@@ -863,7 +782,6 @@

dependency_ns_alias

Namespace alias to form the dependency on dependency_ns

-
@@ -884,7 +802,6 @@

implementation_defined_ns_alias

Namespace alias to form a dependency on the implementation-defined namespace

-
@@ -905,7 +822,6 @@

see_below_ns_alias

Namespace alias to form a dependency on the see-below namespace

-
@@ -920,9 +836,7 @@

Synopsis

Description

-

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.

diff --git a/test-files/golden-tests/filters/symbol-name/extraction-mode.xml b/test-files/golden-tests/filters/symbol-name/extraction-mode.xml index 3076c6d5ba..a85814e5f2 100644 --- a/test-files/golden-tests/filters/symbol-name/extraction-mode.xml +++ b/test-files/golden-tests/filters/symbol-name/extraction-mode.xml @@ -45,8 +45,7 @@ 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. @@ -57,8 +56,7 @@ A symbol that passes the see-below filter - 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 + 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. @@ -73,10 +71,8 @@ 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 + 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. @@ -88,10 +84,8 @@ A symbol that passes the implementation-defined filter - A symbol that passes the filters and the implementation-defined filter - The symbol is implementation defined and should not have a page. - Members of an implementation-defined scope should not be traversed. - If they are traversed for some other reason, they should also become + A symbol that passes the filters and the implementation-defined filter The symbol is implementation defined and should not have a page. + Members of an implementation-defined scope should not be traversed. If they are traversed for some other reason, they should also become implementation-defined. @@ -106,12 +100,10 @@ A function to get an implementation-defined symbol - When used in a function, the implementation-defined - comment should replace the real type. + 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. + It's the responsibility of the function documentation to explain the implementation-defined symbol. @@ -122,8 +114,7 @@ An excluded symbol used as a dependency by a regular symbol - A symbol excluded by filters but is used as a dependency - The symbol should be extracted as a dependency but its + A symbol excluded by filters but is used as a dependency The symbol should be extracted as a dependency but its members should not be traversed. @@ -138,8 +129,7 @@ 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. @@ -150,12 +140,10 @@ A see-below namespace - All member symbols should become see-below. All members are - traversed as see-below. + 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. + The documentation page for these symbols should include the see-below comment. @@ -165,8 +153,7 @@ 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. @@ -177,8 +164,7 @@ 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. @@ -189,13 +175,11 @@ Implementation-defined symbol in a see-below namespace - The symbol does not become see-below because the - the implentation-defined filter has precedence over the + The symbol does not become see-below because the the implentation-defined filter has precedence over the see-below filter. - Functions using this symbol should explain the implementation-defined - nature of the symbol. + Functions using this symbol should explain the implementation-defined nature of the symbol. @@ -209,12 +193,10 @@ 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. + 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. + It's the responsibility of the function documentation to explain the implementation-defined symbol. @@ -225,13 +207,11 @@ 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. + 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. - This will not have a page and functions using this symbol - should explain the dependency. + This will not have a page and functions using this symbol should explain the dependency. @@ -245,13 +225,11 @@ 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. + 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. + It's the responsibility of the function documentation to explain the dependency. @@ -263,8 +241,7 @@ 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. @@ -275,8 +252,7 @@ An implementation-defined namespace - Members are not traversed and, if traversed for some - other reason, they also become implementation-defined. + Members are not traversed and, if traversed for some other reason, they also become implementation-defined. @@ -337,8 +313,7 @@ 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. @@ -349,8 +324,7 @@ 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. + 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". @@ -367,10 +341,8 @@ 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 + 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. @@ -396,12 +368,10 @@ 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. + 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. + It's the responsibility of the function documentation to explain the implementation-defined symbol. @@ -423,8 +393,7 @@ 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. diff --git a/test-files/golden-tests/javadoc/brief-1.adoc b/test-files/golden-tests/javadoc/brief-1.adoc index 84c3d1afef..de01d9aa12 100644 --- a/test-files/golden-tests/javadoc/brief-1.adoc +++ b/test-files/golden-tests/javadoc/brief-1.adoc @@ -12,10 +12,7 @@ | Name | Description | <> -| brief -*bold* -it -continues to the line. +| brief *bold* itcontinues to the line. @@ -30,10 +27,7 @@ continues to the line. == f5 -brief -*bold* -it -continues to the line. +brief *bold* itcontinues to the line. @@ -70,10 +64,7 @@ f6(); === Description -many lined -*bold* -what will -happen? +many lined *bold* what will happen? diff --git a/test-files/golden-tests/javadoc/brief-1.html b/test-files/golden-tests/javadoc/brief-1.html index 3b85f9c108..4583438afe 100644 --- a/test-files/golden-tests/javadoc/brief-1.html +++ b/test-files/golden-tests/javadoc/brief-1.html @@ -18,13 +18,11 @@

Functions

-
f5

brief bold it continues to the line.

- +f5

brief bold itcontinues to the line.

f6

brief

- @@ -33,8 +31,7 @@

Functions

f5

-

brief bold it continues to the line.

- +

brief bold itcontinues to the line.

@@ -58,7 +55,6 @@

f6

brief

-
@@ -74,8 +70,7 @@

Synopsis

Description

-

many lined bold what will happen?

- +

many lined bold what will happen?

diff --git a/test-files/golden-tests/javadoc/brief-1.xml b/test-files/golden-tests/javadoc/brief-1.xml index a699f06252..f688679262 100644 --- a/test-files/golden-tests/javadoc/brief-1.xml +++ b/test-files/golden-tests/javadoc/brief-1.xml @@ -8,8 +8,7 @@ brief bold - it - continues to the line. + itcontinues to the line. @@ -20,10 +19,9 @@ brief - many lined + many lined bold - what will - happen? + what will happen? diff --git a/test-files/golden-tests/javadoc/brief-2.adoc b/test-files/golden-tests/javadoc/brief-2.adoc index a3550452ac..214f42e3c4 100644 --- a/test-files/golden-tests/javadoc/brief-2.adoc +++ b/test-files/golden-tests/javadoc/brief-2.adoc @@ -32,14 +32,12 @@ | <> -| br -ief +| brief | <> -| br -ief +| brief @@ -124,8 +122,7 @@ f4(); === Description -br -ief +brief @@ -133,8 +130,7 @@ ief == f5 -br -ief +brief @@ -153,8 +149,7 @@ f5(); == f6 -br -ief +brief diff --git a/test-files/golden-tests/javadoc/brief-2.html b/test-files/golden-tests/javadoc/brief-2.html index 2a10f9b6f8..78f681b48a 100644 --- a/test-files/golden-tests/javadoc/brief-2.html +++ b/test-files/golden-tests/javadoc/brief-2.html @@ -20,26 +20,20 @@

Functions

f1

brief

- f2

brief

- f3

brief

- f4

brief x

- -f5

br ief

- +f5

brief

-f6

br ief

- +f6

brief

@@ -52,7 +46,6 @@

f1

brief

-
@@ -74,7 +67,6 @@

f2

brief

-
@@ -96,7 +88,6 @@

f3

brief

-
@@ -118,7 +109,6 @@

f4

brief x

-
@@ -134,8 +124,7 @@

Synopsis

Description

-

br ief

- +

brief

@@ -144,8 +133,7 @@

Description

f5

-

br ief

- +

brief

@@ -166,8 +154,7 @@

Synopsis

f6

-

br ief

- +

brief

@@ -188,7 +175,6 @@

Description

desc

-
diff --git a/test-files/golden-tests/javadoc/brief-2.xml b/test-files/golden-tests/javadoc/brief-2.xml index c0cd24d8ce..749d6333b5 100644 --- a/test-files/golden-tests/javadoc/brief-2.xml +++ b/test-files/golden-tests/javadoc/brief-2.xml @@ -34,8 +34,7 @@ brief x - br - ief + brief @@ -43,8 +42,7 @@ - br - ief + brief @@ -52,8 +50,7 @@ - br - ief + brief desc diff --git a/test-files/golden-tests/javadoc/code.adoc b/test-files/golden-tests/javadoc/code.adoc new file mode 100644 index 0000000000..f87e9ec59f --- /dev/null +++ b/test-files/golden-tests/javadoc/code.adoc @@ -0,0 +1,61 @@ += Reference +:mrdocs: + +[#index] +== Global namespace + + +=== Functions + +[cols=2] +|=== +| Name | Description + +| <> +| brief + + + +|=== + +[#f] +== f + + +brief + + + +=== Synopsis + + +Declared in `<code.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f(); +---- + +=== Description + + +This description contains code: + +[,cpp] +---- +// code comment +// code comment +template < class T > +auto +algorithm( T&& v = {} ) -> + typename T::result_type +{ + return v.result(); +} +---- + + + + +[.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/golden-tests/javadoc/code.cpp b/test-files/golden-tests/javadoc/code.cpp new file mode 100644 index 0000000000..589eb04240 --- /dev/null +++ b/test-files/golden-tests/javadoc/code.cpp @@ -0,0 +1,18 @@ +/** brief + + This description contains code: + + @code + // code comment + // code comment + template < class T > + auto + algorithm( T&& v = {} ) -> + typename T::result_type + { + return v.result(); + } + @endcode + + */ +void f(); \ No newline at end of file diff --git a/test-files/golden-tests/javadoc/code.html b/test-files/golden-tests/javadoc/code.html new file mode 100644 index 0000000000..d083b5e781 --- /dev/null +++ b/test-files/golden-tests/javadoc/code.html @@ -0,0 +1,71 @@ + + +Reference + + +
+

Reference

+
+
+

Global namespace

+
+

Functions

+ + + + + + + + + + +
NameDescription
f

brief

+ +
+
+
+
+

f

+
+

brief

+ + +
+
+
+

Synopsis

+
+Declared in <code.cpp>
+
+
+void
+f();
+
+
+
+
+

Description

+

This description contains code:

+ +// code comment +// code comment +template < class T > +auto +algorithm( T&& v = {} ) -> + typename T::result_type +{ + return v.result(); +} + + + +
+
+ +
+
+

Created with MrDocs

+
+ + \ No newline at end of file diff --git a/test-files/golden-tests/javadoc/code.xml b/test-files/golden-tests/javadoc/code.xml new file mode 100644 index 0000000000..4a74c0344c --- /dev/null +++ b/test-files/golden-tests/javadoc/code.xml @@ -0,0 +1,28 @@ + + + + + + + + brief + + + This description contains code: + + + // code comment + // code comment + template < class T > + auto + algorithm( T&& v = {} ) -> + typename T::result_type + { + return v.result(); + } + + + + + diff --git a/test-files/golden-tests/javadoc/commands.html b/test-files/golden-tests/javadoc/commands.html index 4f1ee46c00..7ec8dc04b9 100644 --- a/test-files/golden-tests/javadoc/commands.html +++ b/test-files/golden-tests/javadoc/commands.html @@ -20,7 +20,6 @@

Functions

f1

brief

- @@ -32,7 +31,6 @@

f1

brief

-
@@ -51,7 +49,6 @@

Description

mrdocs hello

-
diff --git a/test-files/golden-tests/javadoc/duplicate-jdoc.html b/test-files/golden-tests/javadoc/duplicate-jdoc.html index e5fa901f4b..00cf3dc642 100644 --- a/test-files/golden-tests/javadoc/duplicate-jdoc.html +++ b/test-files/golden-tests/javadoc/duplicate-jdoc.html @@ -20,27 +20,21 @@

Functions

f0

f0 brief

- f1

f1 brief

- g0

g0 brief

- g1

g1 brief

- h0

h0 brief

- h1

h1 brief

- @@ -52,7 +46,6 @@

f0

f0 brief

-
@@ -70,7 +63,6 @@

Synopsis

Return Value

int

-
@@ -80,7 +72,6 @@

f1

f1 brief

-
@@ -98,7 +89,6 @@

Synopsis

Return Value

bool

-
@@ -108,7 +98,6 @@

g0

g0 brief

-
@@ -135,13 +124,11 @@

Parameters

a

one

- a

one

- @@ -155,7 +142,6 @@

g1

g1 brief

-
@@ -182,13 +168,11 @@

Parameters

a

one

- b

two

- @@ -202,7 +186,6 @@

h0

h0 brief

-
@@ -230,13 +213,11 @@

Template Parameters

T

one

- T

one

- @@ -250,7 +231,6 @@

h1

h1 brief

-
@@ -278,13 +258,11 @@

Template Parameters

T

one

- U

two

- diff --git a/test-files/golden-tests/javadoc/duplicate-jdoc.xml b/test-files/golden-tests/javadoc/duplicate-jdoc.xml index cf0b3d8962..7c035402b5 100644 --- a/test-files/golden-tests/javadoc/duplicate-jdoc.xml +++ b/test-files/golden-tests/javadoc/duplicate-jdoc.xml @@ -9,10 +9,10 @@ - f0 brief + f0 brief - int + int int @@ -26,10 +26,10 @@ - f1 brief + f1 brief - int + int bool @@ -43,10 +43,10 @@ - g0 brief + g0 brief - one + one one @@ -60,10 +60,10 @@ - g1 brief + g1 brief - one + one two @@ -76,10 +76,10 @@ - h0 brief + h0 brief - one + one one @@ -93,10 +93,10 @@ - h1 brief + h1 brief - one + one two diff --git a/test-files/golden-tests/javadoc/para-1.html b/test-files/golden-tests/javadoc/para-1.html index 853d2c6302..fa68763068 100644 --- a/test-files/golden-tests/javadoc/para-1.html +++ b/test-files/golden-tests/javadoc/para-1.html @@ -26,7 +26,6 @@

Functions

f4

brief

- @@ -86,7 +85,6 @@

f4

brief

-
@@ -103,13 +101,10 @@

Synopsis

Description

a

-

b

-

c

-
diff --git a/test-files/golden-tests/javadoc/para-2.adoc b/test-files/golden-tests/javadoc/para-2.adoc index 9c559d3e02..b026af6f15 100644 --- a/test-files/golden-tests/javadoc/para-2.adoc +++ b/test-files/golden-tests/javadoc/para-2.adoc @@ -40,10 +40,7 @@ f1(); === Description -a -b -c -d +a b c d diff --git a/test-files/golden-tests/javadoc/para-2.html b/test-files/golden-tests/javadoc/para-2.html index cb06f0f439..4324b692d7 100644 --- a/test-files/golden-tests/javadoc/para-2.html +++ b/test-files/golden-tests/javadoc/para-2.html @@ -20,7 +20,6 @@

Functions

f1

brief

- @@ -32,7 +31,6 @@

f1

brief

-
@@ -48,8 +46,7 @@

Synopsis

Description

-

a b c d

- +

a b c d

diff --git a/test-files/golden-tests/javadoc/para-2.xml b/test-files/golden-tests/javadoc/para-2.xml index f94d789dc0..267d444304 100644 --- a/test-files/golden-tests/javadoc/para-2.xml +++ b/test-files/golden-tests/javadoc/para-2.xml @@ -9,10 +9,8 @@ brief
- a - b - c - d + a b + c d
diff --git a/test-files/golden-tests/javadoc/para-3.adoc b/test-files/golden-tests/javadoc/para-3.adoc index 9a3dc62204..0b1e3fda62 100644 --- a/test-files/golden-tests/javadoc/para-3.adoc +++ b/test-files/golden-tests/javadoc/para-3.adoc @@ -37,16 +37,15 @@ my_function(); -=== A heading. -Some text. +=== A heading. Some text. More text... -Another paragraph -Next line +Another paragraph Next line === Exception safety + No‐throw guarantee. diff --git a/test-files/golden-tests/javadoc/para-3.html b/test-files/golden-tests/javadoc/para-3.html index 5e2c35ffb1..38172763fd 100644 --- a/test-files/golden-tests/javadoc/para-3.html +++ b/test-files/golden-tests/javadoc/para-3.html @@ -44,18 +44,13 @@

Synopsis

Description

-

A heading.

-

Some text.

- +

A heading. Some text.

More text...

- -

Another paragraph Next line

- +

Another paragraph Next line

Exception safety

No-throw guarantee.

-
diff --git a/test-files/golden-tests/javadoc/para-3.xml b/test-files/golden-tests/javadoc/para-3.xml index ade821d40b..8089314a43 100644 --- a/test-files/golden-tests/javadoc/para-3.xml +++ b/test-files/golden-tests/javadoc/para-3.xml @@ -8,16 +8,12 @@ A function - A heading. - - Some text. - + A heading. Some text. More text... - Another paragraph - Next line + Another paragraph Next line Exception safety diff --git a/test-files/golden-tests/javadoc/param-direction.html b/test-files/golden-tests/javadoc/param-direction.html index 319163c1d3..eb00372401 100644 --- a/test-files/golden-tests/javadoc/param-direction.html +++ b/test-files/golden-tests/javadoc/param-direction.html @@ -68,9 +68,7 @@

Parameters

x0 -

- - + @@ -105,15 +103,11 @@

Parameters

x1 -

- - + y1 [in] -

- - + @@ -148,15 +142,11 @@

Parameters

x2 -

- - + y2 [out] -

- - + @@ -191,15 +181,11 @@

Parameters

x3 [in] -

- - + y3 [out] -

- - + @@ -234,15 +220,11 @@

Parameters

x4 -

- - + y4 [inout] -

- - + @@ -278,21 +260,15 @@

Parameters

x5 [out] -

- - + y5 [in] -

- - + z5 -

- - + @@ -329,21 +305,15 @@

Parameters

x6 [out] -

- - + y6 -

- - + z6 [in] -

- - + @@ -378,15 +348,11 @@

Parameters

x7 [in] -

- - + y7 [out] -

- - + @@ -419,9 +385,7 @@

Parameters

x8 [in] -

- - + @@ -454,15 +418,11 @@

Parameters

x9 [in] -

- - + x9 [out] -

- - + diff --git a/test-files/golden-tests/javadoc/param.html b/test-files/golden-tests/javadoc/param.html index c61b713119..e8e3d0e0b2 100644 --- a/test-files/golden-tests/javadoc/param.html +++ b/test-files/golden-tests/javadoc/param.html @@ -56,9 +56,7 @@

Parameters

x -

- - + @@ -93,15 +91,11 @@

Parameters

x -

- - + y -

- - + @@ -137,21 +131,15 @@

Parameters

x -

- - + y -

- - + z -

- - + @@ -188,27 +176,19 @@

Parameters

w -

- - + x -

- - + y -

- - + z -

- - + diff --git a/test-files/golden-tests/javadoc/pre-post.html b/test-files/golden-tests/javadoc/pre-post.html index ea604fd579..17ce2bc2b9 100644 --- a/test-files/golden-tests/javadoc/pre-post.html +++ b/test-files/golden-tests/javadoc/pre-post.html @@ -42,10 +42,8 @@

Synopsis

Preconditions

  • first precondition

    -
  • second precondition

    -
@@ -53,7 +51,6 @@

Preconditions

Postconditions

  • first postcondition

    -
diff --git a/test-files/golden-tests/javadoc/pre-post.xml b/test-files/golden-tests/javadoc/pre-post.xml index 46ef514654..7930deff6a 100644 --- a/test-files/golden-tests/javadoc/pre-post.xml +++ b/test-files/golden-tests/javadoc/pre-post.xml @@ -6,7 +6,7 @@
-        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

-

See f1

- +

See f1

@@ -131,10 +126,8 @@

Member Functions

Description

-

See A::f1

- -

See ::A::f1

- +

See A::f1

+

See ::A::f1

@@ -241,8 +234,7 @@

Types

-E

See f3

- +E

See f3

@@ -267,8 +259,7 @@

Member Functions

A::D::E

-

See f3

- +

See f3

@@ -287,10 +278,8 @@

Synopsis

Description

-

See f4

- -

See C::f4

- +

See f4

+

See C::f4

@@ -315,8 +304,7 @@

Synopsis

A::f1

-

See f0

- +

See f0

@@ -334,8 +322,7 @@

Synopsis

Description

-

See ::f0

- +

See ::f0

@@ -1051,8 +1038,7 @@

Synopsis

f5

-

See A::f1

- +

See A::f1

@@ -1070,8 +1056,7 @@

Synopsis

Description

-

See ::A::f1

- +

See ::A::f1

@@ -1080,8 +1065,7 @@

Description

f6

@@ -1099,82 +1083,44 @@

Synopsis

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

+
+
+

Global namespace

+
+

Types

+ + + + + + + + + + +
NameDescription
A

Brief for A

+ +
+
+
+
+

A

+
+

Brief for A

+ + +
+
+
+

Synopsis

+
+Declared in <styled.cpp>
+
+
+struct A;
+
+
+
+

Member Functions

+ + + + + + + + + + +
NameDescription
compare

Compare function

+ +
+ + +
+

Description

+

Paragraph with code , bold text, and italic text.

+

We can also escape these markers: `, *, and _.

+ + +
+
+
+
+

A::compare

+
+

Compare function

+ + +
+
+
+

Synopsis

+
+Declared in <styled.cpp>
+
+
+int
+compare(A const& other) const noexcept;
+
+
+
+
+

Return Value

+

-1 if *this < other , 0 if this == other , and 1 if this > other .

+ +
+
+ +
+
+

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

-
@@ -150,7 +141,6 @@

Friends

T

Friend T brief

- @@ -164,7 +154,6 @@

T

Friend T 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.

-