fix LDRAW_ORG parsing

Tue, 28 May 2019 19:10:52 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 28 May 2019 19:10:52 +0300
changeset 49
a1f5c12fa45c
parent 48
38b0919c1934
child 50
0193f8820ba8

fix LDRAW_ORG parsing

header.py file | annotate | diff | comparison | revisions
--- a/header.py	Sat May 25 18:37:55 2019 +0200
+++ b/header.py	Tue May 28 19:10:52 2019 +0300
@@ -95,15 +95,14 @@
         for header_entry in self.get_more_header_stuff():
             if self.try_to_match(
                 '^!LDRAW_ORG ' + 
-                r'(' \
-                    '(?:Unofficial_)?' \
+                r'((?:Unofficial_)?(?:' \
                     'Part|' \
                     'Subpart|' \
                     'Primitive|' \
                     '8_Primitive|' \
                     '48_Primitive|' \
                     'Shortcut' \
-                ')\s?' \
+                '))\s?' \
                 '(.*)$',
                 'part type'):
                 result.filetype = self.groups[0]

mercurial