--- a/src/html.cpp Mon May 19 13:30:18 2025 +0200 +++ b/src/html.cpp Mon May 19 13:58:19 2025 +0200 @@ -134,9 +134,21 @@ } } +void html::chart_begin(const std::string& repo, const std::string& author) { + indent(); + printf("<div class=\"chart\" data-repo=\"%s\" data-author=\"%s\">\n", + encode(repo).c_str(), encode(author).c_str()); + indentation++; +} + +void html::chart_end() { + indent(-1); + puts("</div>"); +} + void html::heading_repo(const std::string& repo) { indent(); - printf("<h1>%s</h1>\n", encode(repo).c_str()); + printf("<h1 data-repo=\"%s\">%1$s</h1>\n", encode(repo).c_str()); } void html::heading_author(const std::string& author, unsigned int total_commits) { @@ -179,8 +191,7 @@ } void html::table_end() { - indentation--; - indent(); + indent(-1); puts("</table>"); }