From 8460536b806144c12b0adcb3f83543b8634035b1 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Thu, 2 Nov 2023 10:14:48 +0000 Subject: [PATCH] Revert "Ignore unformatted text blocks that are not scripts or files" This reverts commit abbb94060bb9c852f740b733210cae1f995a6f21. Due to causing existing learning paths to fail tests. I've opened issue #562 to discuss the larger issue here, which I did not understand when I did this change. --- tools/parse.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/parse.py b/tools/parse.py index 9ae2a7f26..1950e5301 100644 --- a/tools/parse.py +++ b/tools/parse.py @@ -212,15 +212,11 @@ def save(article, cmd, learningpath=False, img=None): # for other types, we're assuming source code # check if a file name is specified else: - # check for a file name + content[i_idx] = {"type": l[0]} + # check file name if "file_name" in l[0]: - content[i_idx] = {"type": l[0]} fn = l[0].split("file_name=\"")[1].split("\"")[0] content[i_idx].update({"file_name": fn }) - else: - # No file name means it is some unformatted text, rather than - # some executable script or code. Skip it. - continue for j_idx,j in enumerate(l[1:]): content[i_idx].update({j_idx: j})