-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
We currently break change elements (<ins>
, <del>
) around block-level elements and <a>
elements so that they are always children or siblings of those elements rather than wrapping them:
web-monitoring-diff/web_monitoring_diff/html_render_diff.py
Lines 1275 to 1277 in 1753d43
# Also treat `a` tags as block in this context, because they *can* | |
# contain block elements, like `h1`, etc. | |
is_block = name in block_level_tags or name == 'a' |
web-monitoring-diff/web_monitoring_diff/html_render_diff.py
Lines 1535 to 1537 in 1753d43
# Also treat `a` tags as block in this context, because they *can* | |
# contain block elements, like `h1`, etc. | |
is_block = name in block_level_tags or name == 'a' |
We should also include <label>
here, since it is frequently presented as block level, even though it is not by default. For example, this change within a label looks confusing because we don’t do this (the text “School or school district” was inserted at the start of the “ZIP Code” label, but the current presentation looks like there is a weird, spurious “School or school district” label getting repeated on the page):
Metadata
Metadata
Assignees
Labels
Type
Projects
Status