Skip to content

Commit

Permalink
Revert "Ignore unformatted text blocks that are not scripts or files"
Browse files Browse the repository at this point in the history
This reverts commit abbb940.

Due to causing existing learning paths to fail tests. I've opened
issue ArmDeveloperEcosystem#562 to discuss the larger issue here, which I did not understand
when I did this change.
  • Loading branch information
DavidSpickett committed Nov 2, 2023
1 parent ec0f854 commit 8460536
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tools/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 8460536

Please sign in to comment.