Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html_render_diff should ignore case by default #35

Open
Mr0grog opened this issue Nov 11, 2020 · 0 comments
Open

html_render_diff should ignore case by default #35

Mr0grog opened this issue Nov 11, 2020 · 0 comments
Labels
enhancement New feature or request never-stale

Comments

@Mr0grog
Copy link
Member

Mr0grog commented Nov 11, 2020

The html_render_diff diff should not be case-sensitive, or it should have an option for case-sensitivity and the default value should not be sensitive. There are two reasons for this:

  • We are generally focused on identifying meaningful changes to the content (as opposed to determining exactly what changed between two versions of a page), and changes in case are not important the vast majority of the time.

  • We have seen quite a few situations where something may have previously been all-caps, and then changed to be normal case and use CSS to make it all caps. Because the capitalization changed, we highlight it as a difference, even though there is no visual impact. This can be really confusing! For example, the main heading (“OIL AND GAS”) and the “LEARN MORE ABOUT…” text both changed that way in this diff:

    Screen Shot 2020-11-10 at 8 08 29 PM

    (See this live at https://monitoring.envirodatagov.org/page/ad09dc3a-b056-4bba-8b58-8d24b0f3e442/18931102-67d3-4f89-9734-f8dd3e69e338..a72f6986-ccec-46ed-ab42-31370ed2e279)

I’m thinking we’d change html_render_diff.html_diff_render() to have the following signature:

def html_diff_render(a_text, b_text, a_headers=None, b_headers=None,
                     include='combined', content_type_options='normal',
                     url_rules='jsessionid', case_sensitive=False):
@Mr0grog Mr0grog added the enhancement New feature or request label Nov 11, 2020
@stale stale bot added the stale label Jun 2, 2021
@edgi-govdata-archiving edgi-govdata-archiving deleted a comment from stale bot Jun 4, 2021
@stale stale bot removed the stale label Jun 4, 2021
@stale stale bot added the stale label Jan 8, 2022
@stale stale bot closed this as completed Apr 16, 2022
@Mr0grog Mr0grog reopened this Apr 17, 2022
@stale stale bot removed the stale label Apr 17, 2022
@edgi-govdata-archiving edgi-govdata-archiving deleted a comment from stale bot Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request never-stale
Projects
None yet
Development

No branches or pull requests

1 participant