1
0
mirror of synced 2024-11-24 05:30:11 +01:00

parsers.py: Allow lowercase command names

This commit is contained in:
Viv 2024-02-10 18:12:44 -05:00
parent 4e976eec28
commit 82754301c7

View File

@ -215,9 +215,9 @@ def parse_tja_course_data(data: List[str]) -> Dict[str, List[TJAMeasure]]:
for idx_l, line in enumerate(data): for idx_l, line in enumerate(data):
# 0. Check to see whether line is a command or note data # 0. Check to see whether line is a command or note data
command, name, value, note_data = '', '', '', '' command, name, value, note_data = '', '', '', ''
match_command = re.match(r"^#([A-Z]+)(?:\s+(.+))?", line) match_command = re.match(r"^#([a-zA-Z0-9]+)(?:\s+(.+))?", line)
if match_command: if match_command:
command = match_command.group(1) command = match_command.group(1).upper()
if match_command.group(2): if match_command.group(2):
value = match_command.group(2) value = match_command.group(2)
else: else: