summaryrefslogtreecommitdiff
path: root/util/compile.py
diff options
context:
space:
mode:
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: