From 9028da620a2c059548300c3071f61511d4b63943 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 8 May 2014 13:05:16 +0200 Subject: Remove unnecessary check from prolog.util.compose --- prolog/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prolog/util.py b/prolog/util.py index 6091b17..f5d1865 100644 --- a/prolog/util.py +++ b/prolog/util.py @@ -74,13 +74,13 @@ def compose(lines, rules): line = lines[i] if i > start: code += ' ' - code += stringify(line).replace('\n', ' ') + code += stringify(line) if i == end-1: code += '.\n' elif i == start: code += ' :-\n' else: - if line and line[-1][0] != 'SEMI' and i < end-1 and lines[i+1][-1][0] != 'SEMI': + if line and line[-1][0] != 'SEMI' and lines[i+1][-1][0] != 'SEMI': code += ',' code += '\n' return code.strip() -- cgit v1.2.1