src/html.cpp

changeset 76
110a234a3260
parent 75
857af79337d5
--- a/src/html.cpp	Fri Feb 06 18:44:47 2026 +0100
+++ b/src/html.cpp	Wed Feb 25 21:13:55 2026 +0100
@@ -92,7 +92,7 @@
         if (hide_repo_names) {
             for (const auto &tags_vector: tags | std::views::values) {
                 for (const auto &tag: tags_vector) {
-                    tags_json += escape_json(tag);
+                    tags_json += escape_json(tag.message);
                     tags_json += ' ';
                 }
             }
@@ -104,7 +104,7 @@
             for (const auto &[repo, tags_vector] : tags) {
                 tags_json += "\"" + escape_json(repo) + "\":\"";
                 for (const auto &tag: tags_vector) {
-                    tags_json += escape_json(tag);
+                    tags_json += escape_json(tag.message);
                     tags_json += ' ';
                 }
                 if (!tags_vector.empty()) {
@@ -120,7 +120,7 @@
         return tags_json;
     }
 
-    static std::string build_tag_array(fm::tag_lists tags, bool hide_repo_names) {
+    static std::string build_tag_summary(fm::tag_summaries tags, bool hide_repo_names) {
         std::string tags_json;
         if (hide_repo_names) {
             tags_json += '[';
@@ -482,7 +482,7 @@
                 commit_summary_json += '}';
                 commit_summary = std::format("data-commits=\"{}\"", encode(commit_summary_json));
             }
-            std::string tags = build_tag_array(summary.tags_with_date, hide_repo_names);
+            std::string tags = build_tag_summary(summary.tags_with_date, hide_repo_names);
             printf("<th scope=\"col\" title=\"Total commits: %u\" colspan=\"%d\" data-total=\"%u\" %s data-tags=\"%s\">%s</th>\n",
                 total, colspans[i], total,
                 commit_summary.c_str(),
@@ -535,10 +535,10 @@
     }
 
     // Build a JSON object of commit summaries
-    auto add_summaries = [](std::string &json, const std::vector<std::string> &summaries) static {
+    auto add_summaries = [](std::string &json, const std::vector<fm::commit_info> &summaries) static {
         // We have to iterate in reverse order to sort the summaries chronologically
         for (const auto &summary :  summaries | std::views::reverse) {
-            json += "\"" + escape_json(summary) + "\",";
+            json += "\"" + escape_json(summary.message) + "\",";
         }
         json.pop_back();
     };

mercurial