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

parsers.py: Account for #SECTION far before first #BRANCHSTART

This commit is contained in:
Viv 2024-02-10 18:13:19 -05:00
parent 82754301c7
commit 334a70e2b1

View File

@ -276,6 +276,9 @@ def parse_tja_course_data(data: List[str]) -> Dict[str, List[TJAMeasure]]:
if data[idx_l+1].startswith('#BRANCHSTART'):
name = 'section'
current_branch = 'all'
elif not branch_condition:
name = 'section'
current_branch = 'all'
# Otherwise, #SECTION exists in isolation. In this case, to
# reset the accuracy, we just repeat the previous #BRANCHSTART.
else: