hunk->new_lines
),
xmlencode(header.substr(header.rfind('@') + 2)),
span {
{{"style", "white-space: pre"}},
transform(
hunk.get_lines(),
[](const auto& line) -> element
{
using hemplate::html::div;
if (line.is_add()) {
return div {
{{"class", "add"}},
xmlencode(line.get_content()),
};
}
if (line.is_del()) {
return div {
{{"class", "del"}},
xmlencode(line.get_content()),
};
}
return element(xmlencode(line.get_content()));
}
),
},
},
span {
transform(
hunk.get_lines(),
[](const auto& line) -> element
{
using hemplate::html::div;
if (line.is_add()) {
return div {
{{"class", "inline add"}},
xmlencode(line.get_content()),
};
}
if (line.is_del()) {
return div {
{{"class", "inline del"}},
xmlencode(line.get_content()),
};
}
return div {
{{"class", "inline"}},
xmlencode(line.get_content()),
};
}
),
},
};
}