Change markup for diff insert/delete lines

HTML provides semantic markup for the concept of inserting and deleting
content from a document. Leveraging these tags can increase the
correctness and accessibility of the document without effecting its
presentation.

See:

- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del
This commit is contained in:
Chris DeLuca 2022-04-26 21:37:47 -04:00 committed by Drew DeVault
parent 76af91d084
commit b75d2f0e03
2 changed files with 3 additions and 2 deletions

View File

@ -195,8 +195,8 @@ instead.
target="_blank"
{% endif %}
>{{patch.delta.new_file.raw_path.decode('utf-8', 'replace')}}</a>{#
#} <span class="pull-right"><span class="text-success">+{{patch.line_stats[1]}}</span>{#
#} <span class="text-danger">-{{patch.line_stats[2]}}</span></span>{%
#} <span class="pull-right"><ins class="text-success">+{{patch.line_stats[1]}}</ins>{#
#} <del class="text-danger">-{{patch.line_stats[2]}}</del></span>{%
if patch.delta.old_file.mode != patch.delta.new_file.mode %}{#
#}{#
#}{% endif %}</pre>

View File

@ -230,6 +230,7 @@ dt {
}
.diff {
ins, del,
.lineno {
text-decoration: none;
}