Closed mentalstring closed 2 years ago
You should be able to use:
diff_tool: "diff --ignore-all-space"
That works great — will add it to the config defaults. Thank you!
Seems to have lost the colouring of the output so I'm guessing I'm overriding some default parameters. Tried to look through the code but couldn't figure it out what they are.
Which color output do you mean? stdout? e-mail/HTML?
Coloring of the diff happens here: https://github.com/thp/urlwatch/blob/master/lib/urlwatch/reporters.py
self._has_color = sys.stdout.isatty() and self.config.get('color', False)
For example, if you pipe the tool output into a different process, it won't color it -- or if the config for the stdout reporter doesn't have color
set to a true-y value:
report:
stdout:
color: true
Sorry for not being specific — I meant the email/HTML report. Used to be colorized and the only config change was the diff_tool
.
I was able to get the coloring to work again by using
diff_tool: "diff --ignore-all-space -u"
to get the unified out of diff
. Not sure whether this is intended behavior and/or if it's worth documenting?
Oh yeah, of course -- the coloring happens for unified diff. Yeah, I think it might make sense to add a small section to the docs how to ignore whitespace with this line. Want to have a try at a PR to the docs?
Closing this as "done" in #707 by documentation.
I have looked into the documentation but couldn't find any obvious way to do this: how to ignore changes if they are only whitespace changes?
Sometimes pages change layout slightly, or the output of PDFs is styled a bit different, but despite no actual content changes, it still triggers a notification. Any way to better handle this?