You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we wind up showing a change on text that looks unchanged because nearby whitespace changed in a non-visible way. There are just a few main versions of this:
Whitespace changed in a way that’s totally meaningless in HTML (outside of <pre> elements or white-space: pre* styled elements). Since multiple spaces and line breaks all get collapsed into a single space in HTML, they’re not meaningful changes unless in specific contexts. We should normalize them to a single space.
Spaces getting swapped out for non-breaking spaces (or vice-versa). These changes are technically different an may have a subtle impact on page layout, but are not semantically different for users. I’m thinking a good way to handle this is to give tokens a diffable text representation (in which non-breaking spaces are replaced by spaces) and a literal text representation (where these types of characters are unchanged). The former is used for comparisons, but the latter is used when stitching the actual diff back together.
Different kinds of more fancy spaces get swapped out (hair space, em space, etc.). These are more visible to the user, but still usually not that meaningful for most of this diff’s use cases. The right solution here is probably the same as for (2) above.
Sometimes we wind up showing a change on text that looks unchanged because nearby whitespace changed in a non-visible way. There are just a few main versions of this:
<pre>
elements orwhite-space: pre*
styled elements). Since multiple spaces and line breaks all get collapsed into a single space in HTML, they’re not meaningful changes unless in specific contexts. We should normalize them to a single space.Here’s an example of case (2) above: https://monitoring.envirodatagov.org/page/4415ea86-293e-48ab-9b4f-da2382cc4200/c43894cb-b954-40d7-be18-4ce14a22a90b..e8844efa-fd2b-41d5-a451-1cc54c1d680a
The text was updated successfully, but these errors were encountered: