From 81b6ca94a5667047dd5b45d6cc0c6e8a74a9a552 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 26 Apr 2014 22:47:37 +0100 Subject: [PATCH] Gap removal --- makeJargon.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/makeJargon.py b/makeJargon.py index 0dae43c..015737b 100755 --- a/makeJargon.py +++ b/makeJargon.py @@ -21,6 +21,13 @@ def jargonParseEntry(filename): if i >= 2: text = text + line[i] text = text.replace('\n',' ') + + # remove any gaps + pos = text.find(' ') + while pos != -1: + text = text.replace(' ',' ') + pos = text.find(' ') + entry.append(text.strip()) return entry