Added paragaph array to clang comment parser
This commit is contained in:
@@ -24,7 +24,19 @@ diagrams:
|
||||
note left of {{ alias("C") }} #AABBCC
|
||||
{{ trim(comment("clanguml::t00050::C").text) }}
|
||||
end note
|
||||
- >
|
||||
{% set cmt=comment("clanguml::t00050::G").paragraph %}
|
||||
note top of {{ alias("G") }}
|
||||
{{ trim(cmt.0) }}
|
||||
end note
|
||||
|
||||
note right of {{ alias("G") }}
|
||||
{{ trim(cmt.1) }}
|
||||
end note
|
||||
|
||||
note bottom of {{ alias("G") }}
|
||||
{{ trim(cmt.2) }}
|
||||
end note
|
||||
- >
|
||||
{# Render brief comments and todos, if any were written for an element #}
|
||||
{% for e in diagram.elements %}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace utils {
|
||||
class D {
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace utils
|
||||
|
||||
/// Mollis pretium lorem primis
|
||||
enum class E { E1, E2, E3 };
|
||||
@@ -88,6 +88,14 @@ template <typename T, typename V, int N> class F {
|
||||
V v;
|
||||
};
|
||||
|
||||
/// This is a short description of class G.
|
||||
///
|
||||
/// This is an intermediate description of class G.
|
||||
///
|
||||
/// This is a long description of class G.
|
||||
class G {
|
||||
};
|
||||
|
||||
class NoComment {
|
||||
};
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@ TEST_CASE("t00050", "[test-case][class]")
|
||||
REQUIRE_THAT(puml, !HasNote(_A("E"), "bottom"));
|
||||
REQUIRE_THAT(puml, !HasNote(_A("NoComment"), "top"));
|
||||
REQUIRE_THAT(puml, HasNote(_A("F<T,V,int N>"), "top"));
|
||||
REQUIRE_THAT(puml, HasNote(_A("G"), "top"));
|
||||
REQUIRE_THAT(puml, HasNote(_A("G"), "bottom"));
|
||||
REQUIRE_THAT(puml, HasNote(_A("G"), "right"));
|
||||
|
||||
save_puml(
|
||||
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||
|
||||
Reference in New Issue
Block a user