fix author parsing

Tue, 04 Jun 2019 23:58:30 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 04 Jun 2019 23:58:30 +0300
changeset 60
b8fac2477fc8
parent 59
0f3e70a2bb4b
child 61
15c95d3fcfd8

fix author parsing

header.py file | annotate | diff | comparison | revisions
--- a/header.py	Sat Jun 01 14:17:58 2019 +0300
+++ b/header.py	Tue Jun 04 23:58:30 2019 +0300
@@ -98,7 +98,7 @@
         self.skip_to_next()
         result.name = self.parse_pattern(r'^Name: (.+)$', 'name')[0]
         self.skip_to_next()
-        result.author, result.username = self.parse_pattern(r'^Author: ((?:\s*\w+)+) (?:\[([^\]]+)\])?', 'author')
+        result.author, result.username = self.parse_pattern(r'^Author: ([^ \[]*[^\[]+) (?:\[([^\]]+)\])?', 'author')
         for header_entry in self.get_more_header_stuff():
             if self.try_to_match(
                 r'^!LDRAW_ORG ' \

mercurial