From 936c2ec28b146d36512a3d0ab397969964be9cfc Mon Sep 17 00:00:00 2001 From: Christian Kremitzl Date: Tue, 10 Mar 2020 19:16:44 +0100 Subject: [PATCH 1/2] Stop stripping whitespace in fragments --- fragments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments.py b/fragments.py index 83b9238..cf3ffcb 100644 --- a/fragments.py +++ b/fragments.py @@ -22,7 +22,7 @@ def defragmentize(html): class_list += " %s" % FRAGMENT_CLASS fragment.set('class', class_list) - fragment.text = re.sub(r"\s*%s\s*" % re.escape(FRAGMENT_TAG), '', fragment.text).strip() + fragment.text = re.sub(r"\s*%s\s*" % re.escape(FRAGMENT_TAG), '', fragment.text) return etree.tostring(dom, method='html', encoding='utf-8', pretty_print=True).decode('utf-8') From 3df832c585b04335b8bf10e3d42af98570734efc Mon Sep 17 00:00:00 2001 From: Christian Kremitzl Date: Tue, 10 Mar 2020 19:30:53 +0100 Subject: [PATCH 2/2] Make Pandoc dumb again! --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index 015ea21..402ec83 100644 --- a/main.py +++ b/main.py @@ -116,8 +116,7 @@ def get_slide_layout(layout_name): def convert_slide_content(content): filters = [] pdoc_args = [ - '--mathjax', # Preparing formulas - '--smart' # Smart typography (dashes, ellipses, …) + '--mathjax' # Preparing formulas ] return pypandoc.convert_text( content, 'html',