Refactored comment parsing to clang comments

This commit is contained in:
Bartek Kryza
2022-09-18 23:57:02 +02:00
parent e45458de62
commit 920388d84a
31 changed files with 749 additions and 144 deletions

View File

@@ -25,7 +25,7 @@ void inject_diagram_options(std::shared_ptr<clanguml::config::diagram> diagram)
// Inject links config to all test cases
clanguml::config::generate_links_config links_config{
R"(https://github.com/bkryza/clang-uml/blob/{{ git.commit }}/{{ element.source.path }}#L{{ element.source.line }})",
R"({% if "comment" in element %}{{ abbrv(trim(replace(element.comment, "\n+", " ")), 256) }}{% else %}{{ element.name }}{% endif %})"};
R"({% if existsIn(element, "comment") and existsIn(element.comment, "brief") %}{{ abbrv(trim(replace(element.comment.brief.0, "\n+", " ")), 256) }}{% else %}{{ element.name }}{% endif %})"};
diagram->generate_links.set(links_config);
}