From dc8b854adada49d4c68a716a5b624e252a130db8 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 11 Jan 2020 18:15:13 +1000 Subject: [PATCH] drop pystache comparison --- pylib/anki/template2.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pylib/anki/template2.py b/pylib/anki/template2.py index a714956f2..f0da2dd3b 100644 --- a/pylib/anki/template2.py +++ b/pylib/anki/template2.py @@ -45,19 +45,8 @@ def render_template( col: anki.storage._Collection, format: str, fields: Dict[str, str] ) -> str: "Render a single template." - old_output = anki.template.render(format, fields) - rendered = col.backend.render_template(format, fields) - new_output = apply_custom_filters(rendered, fields) - - if old_output != new_output: - print( - f"template rendering didn't match - please report:\n'{old_output}'\n'{new_output}'" - ) - # import os - # open(os.path.expanduser("~/temp1.txt"), "w").write(old_output) - # open(os.path.expanduser("~/temp2.txt"), "w").write(new_output) - return new_output + return apply_custom_filters(rendered, fields) def apply_custom_filters(