const auto indent_str = std::string(current_indent, ' ');
output += indent_str;
+ if (type == SVG::SVGElementType::Svg) {
+ const auto comment = fmt::format("Title: {} Pages: 1", graphviz_id);
+ output += fmt::format("<!-- {} -->\n", xml_encode(comment));
+ }
+
output += "<";
output += tag(type);
for (std::size_t i = 0; i < original_svg_lines.size(); i++) {
REQUIRE(i < recreated_svg_lines.size());
if (recreated_svg_lines[i] == "<svg>") {
- // stop comparison here since we do not yet handle the graph title
- // comment that comes before the 'svg' element
+ // stop comparison here since we do not yet handle attributes on the
+ // 'svg' element
break;
}
REQUIRE(recreated_svg_lines[i] == original_svg_lines[i]);