Mercurial > kallithea
view whitespacecleanup.sh @ 5087:85a6526a15a8 stable
diff view: do not hide overflow on very long lines that cannot be wrapped
When a change contains very long lines that cannot be wrapped because they
contain very long 'words' without spaces, the overflow is currently not
visible at all. This occurrence of such very long non-wrappable words is
pretty uncommon, but can for example happen in comma-separated value files.
Not touching the existing behavior of trying to wrap long lines, this patch
adds horizontal scrollbars for these exceptional cases of unavoidable
overflow.
On normal lines and long lines that can be wrapped, the diff block remains
the same as before.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Fri, 01 May 2015 21:17:55 +0200 |
parents | 9cf229b46e49 |
children | 40871e0eb13a |
line wrap: on
line source
#!/bin/bash -x # Enforce some consistency in whitespace - just to avoid spurious whitespaces changes files=`hg loc '*.py' '*.html' '*.css' '*.rst' '*.txt' '*.js' | egrep -v '/lockfiles.py|LICENSE-MERGELY.html|/codemirror/|/fontello/|(graph|mergely|native.history|select2/select2|yui.flot)\.js$'` sed -i "s,`printf '\t'`, ,g" $files sed -i "s, *$,,g" $files sed -i 's,\([^ /]\){,\1 {,g' `hg loc '*.css'` sed -i 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'` sed -i 's/^\( [^: ]*\) *: *\([^/]\)/\1: \2/g' kallithea/public/css/{style,contextbar}.css sed -i '1s|, |,|g' kallithea/public/css/{style,contextbar}.css sed -i 's/^\([^ ,/]\+ [^,]*[^ ,]\) *, *\(.\)/\1,\n\2/g' kallithea/public/css/{style,contextbar}.css sed -i 's/^\([^ ,/].*\) */\1 /g' kallithea/public/css/{style,contextbar}.css sed -i 's,^--$,-- ,g' kallithea/templates/email_templates/main.txt hg diff