Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Ignore unformatted text blocks that are not scripts or files" #563

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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