From 334a70e2b1b6422e668dba1111ab21e49b30c2a8 Mon Sep 17 00:00:00 2001 From: Viv Date: Sat, 10 Feb 2024 18:13:19 -0500 Subject: [PATCH] `parsers.py`: Account for `#SECTION` far before first `#BRANCHSTART` --- src/tja2fumen/parsers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tja2fumen/parsers.py b/src/tja2fumen/parsers.py index 852c59c..14ac200 100644 --- a/src/tja2fumen/parsers.py +++ b/src/tja2fumen/parsers.py @@ -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: