From 0c5e11825fadc575e72746bb1f020630cfd9ef40 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Mon, 23 Nov 2015 23:39:41 +0100 Subject: always draw a cell --- watchnews/web.py | 10 +++++++--- 1 file 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 -- cgit v1.2.1