summaryrefslogtreecommitdiff
path: root/util/compile.py
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-04-18 19:59:56 -0700
committerAlex Yatskov <alex@foosoft.net>2016-04-18 19:59:56 -0700
commit24957748918403a387fbae47f593001ce361891a (patch)
treee8c881a0097567d4459281a976f85cb162d17d8d /util/compile.py
parentc4e35fbf54a9cd80e27d600d47b24b1afdfeca6d (diff)
Better tag rendering
Diffstat (limited to 'util/compile.py')
-rwxr-xr-xutil/compile.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/compile.py b/util/compile.py
index 9c5a6bdd..d5a916fd 100755
--- a/util/compile.py
+++ b/util/compile.py
@@ -193,15 +193,15 @@ def parse_edict(path):
for index, dfn in enumerate(filter(None, segments[1:])):
dfn_match = re.search(r'^((?:\((?:[\w\-\,\:]*)*\)\s*)*)(.*)$', dfn)
- gloss = dfn_match.group(2).strip()
- if len(gloss) == 0:
- continue
-
tags_raw = set(filter(None, re.split(r'[\s\(\),]', dfn_match.group(1))))
tags_raw = fixup_godan_verbs(tags_raw)
tags_raw = tags_raw.intersection(set(PARSED_TAGS.keys()))
tags = tags.union(tags_raw)
+ gloss = dfn_match.group(2).strip()
+ if len(gloss) == 0:
+ continue
+
if index == 0 or len(dfn_match.group(1)) > 0:
defs.append([gloss])
else: