@@ -68,17 +68,17 @@ def read_event_file(name, loc_set):
68
68
if open_blocks == 0 and "news_event" in line :
69
69
is_in_news_event = True
70
70
if is_in_news_event :
71
- match = re .search (r'^ \s*title\s*=\s*([^\{]+?)(\s|$)' , line )
71
+ match = re .search (r'(^|\s) \s*title\s*=\s*([^\{]+?)(\s|$)' , line )
72
72
if match :
73
- loc_set .add (match .group (1 ).strip ())
73
+ loc_set .add (match .group (2 ).strip ())
74
74
else :
75
- match = re .search (r'^ \s*title\s*=\s*{' , line )
75
+ match = re .search (r'(^|\s) \s*title\s*=\s*{' , line )
76
76
if match :
77
77
is_in_title = True
78
78
if is_in_title :
79
- match = re .search (r'^ \s*text\s*=\s*([^\{]+?)\s*($|\})' , line )
79
+ match = re .search (r'(^|\s) \s*text\s*=\s*([^\{]+?)\s*($|\})' , line )
80
80
if match :
81
- loc_set .add (match .group (1 ).strip ())
81
+ loc_set .add (match .group (2 ).strip ())
82
82
open_blocks += line .count ('{' )
83
83
open_blocks -= line .count ('}' )
84
84
if open_blocks == 1 :
@@ -144,6 +144,9 @@ def read_loc_file(name, loc_set, scripted_loc_re, scripted_loc):
144
144
scripted_loc_re_string = r'\s*?([^\s]*?:[0-9]+\s*)(\")(?!' + re .escape (scripted_loc ) + r')'
145
145
scripted_loc_re = re .compile (scripted_loc_re_string , re .IGNORECASE )
146
146
147
+ for file in glob .glob (os .path .join (loc_path , '*.yml' ), recursive = True ):
148
+ read_loc_file (file , loc_set , scripted_loc_re , scripted_loc )
149
+
147
150
try :
148
151
dir = readable_dir (os .path .join (loc_path , "replace" ))
149
152
for file in glob .glob (os .path .join (loc_path , "replace" , '*.yml' ), recursive = True ):
0 commit comments