Skip to content

Commit 9994052

Browse files
update
1 parent 28c4ddc commit 9994052

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pycropml/transpiler/antlr_py/extract_metadata_from_comment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def ExtractComments(filename, c_st_single, c_st_multi, c_end_multi):
4646
import re
4747
def extract(comment):
4848
keywords = ["name", "version", "timestep" ]
49-
patterns = [r'(\b(?i)Name:\s*(?P<name>\w+))',
50-
r'(-Version:\s*(?P<version>\d+\.*\d+))',
51-
r'(-Time step:\s*(?P<timestep>\d+\.*\d*))']
49+
patterns = [r'(\s*-?\s*Name:\s*(?P<name>\w+))',
50+
r'(\s*-?\s*Version:\s*(?P<version>\d+\.*\d+))',
51+
r'(\s*-?\s*Time step:\s*(?P<timestep>\d+\.*\d*))']
5252

5353
# header of modelUnit name, version, timestep
5454
head = {}

0 commit comments

Comments
 (0)