summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2015-11-23 23:39:41 +0100
committerYves Fischer <yvesf-git@xapek.org>2015-11-23 23:58:21 +0100
commit0c5e11825fadc575e72746bb1f020630cfd9ef40 (patch)
tree9aa2be2683347e8a170037cdf85d7f80c6541711
parentceef47be2730a2e310c1f9731ce99fff961e266c (diff)
downloadwatchnews-0c5e11825fadc575e72746bb1f020630cfd9ef40.tar.gz
watchnews-0c5e11825fadc575e72746bb1f020630cfd9ef40.zip
always draw a cell
-rw-r--r--watchnews/web.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/watchnews/web.py b/watchnews/web.py
index ab87018..c687120 100644
--- a/watchnews/web.py
+++ b/watchnews/web.py
@@ -1,7 +1,7 @@
from . import data, css
from ll.xist import xsc, parse
-from ll.xist.ns import html
+from ll.xist.ns import html, chars
from flask import Flask, url_for
import re
@@ -24,8 +24,10 @@ class DiffSupport:
in_change = False
for ((line1, diff1), (line2, diff2), flag) in diff:
if flag ^ in_change:
- rows.append(html.tr(html.td(' '.join('↔' * 10)),
- html.td(' '.join('↔' * 10))))
+ if flag: symbol = '↓'
+ else: symbol = '↑'
+ rows.append(html.tr(html.td(' '.join(symbol * 10)),
+ html.td(' '.join(symbol * 10))))
in_change = flag
rows.append(html.tr(
html.td(*self._format_diff(diff1)),
@@ -64,6 +66,8 @@ class DiffSupport:
if line != '': # trailing unchanged text
elems += [html.span(line)]
+
+ elems += [ html.br() ]
return elems