From d12b2dee9702dda82120dfff7434ed1b6b300c61 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Tue, 12 Sep 2023 17:31:04 -0700 Subject: [PATCH] Support basic markdown in meta.comment --- build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index b5ca299..7abeae8 100755 --- a/build.py +++ b/build.py @@ -20,6 +20,7 @@ def main(): out = pathlib.Path(args.out) md = markdown.Markdown(extensions=["attr_list", "footnotes", "md_in_html", "meta"]) + comment_md = markdown.Markdown() # Clean the output directory if out.exists(): @@ -108,7 +109,8 @@ def main(): if meta_comment := meta.get("comment"): for comment in meta_comment: aside = page.new_tag("aside") - aside.string = comment + html = bs4.BeautifulSoup(comment_md.convert(comment), features="html.parser") + aside.extend(html.p.contents) page.header.append(aside) # Write the fully templated page