Skip to content
Snippets Groups Projects
Verified Commit 3912b5d4 authored by Jake's avatar Jake :speech_balloon:
Browse files

convert blocks to simple dict

parent b33add3e
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ def run_pandoc(source, base="markdown", extensions=[], extra_args=[]): ...@@ -51,7 +51,7 @@ def run_pandoc(source, base="markdown", extensions=[], extra_args=[]):
# TODO TOC # TODO TOC
#contentmetadata["toc"] = build_toc(n["toc_list"].copy()) #contentmetadata["toc"] = build_toc(n["toc_list"].copy())
blocks = json.dumps(blocks, cls=ElementEncoder) # TODO use json.loads() otherwise this is just a string blocks = json.loads(json.dumps(blocks, cls=ElementEncoder)) # Reduce to 'simple' dict, which can be converted to JSON in Jinja2.
return (blocks, contentmetadata) return (blocks, contentmetadata)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment