From af327c2a35dbf8ff44da80803990909ebe09eeb4 Mon Sep 17 00:00:00 2001 From: Andrea Ciprietti Date: Sun, 15 Jan 2023 00:57:19 +0100 Subject: [PATCH] Added support for interaction section --- p2d/parse_polygon_package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p2d/parse_polygon_package.py b/p2d/parse_polygon_package.py index cc8e544..57d7400 100644 --- a/p2d/parse_polygon_package.py +++ b/p2d/parse_polygon_package.py @@ -27,8 +27,7 @@ def parse_samples_explanations(notes): exit(1) assert(test_id != -1) assert(test_id not in explanations) - curr = curr[0].upper() + curr[1:] # Capitalize first letter. - explanations[test_id] = curr + explanations[test_id] = curr.capitalize() # Capitalize first letter. curr = '' test_id = -1 elif test_id != -1: @@ -119,6 +118,7 @@ def pol_path(*path): problem['statement']['legend'] = statement_json['legend'] problem['statement']['input'] = statement_json['input'] problem['statement']['output'] = statement_json['output'] + problem['statement']['interaction'] = statement_json['interaction'] problem['statement']['tutorial'] = statement_json['tutorial'] explanations = parse_samples_explanations(statement_json['notes'])