summaryrefslogtreecommitdiff
path: root/prolog/util.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2014-05-08 13:05:16 +0200
committerAleš Smodiš <aless@guru.si>2015-08-11 14:26:00 +0200
commit9028da620a2c059548300c3071f61511d4b63943 (patch)
tree1fbbcb74678b879a54be053242ecad0490115768 /prolog/util.py
parent185b174f7585f76fc33bc815b02e94e1907b702d (diff)
Remove unnecessary check from prolog.util.compose
Diffstat (limited to 'prolog/util.py')
-rw-r--r--prolog/util.py4
1 files 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()