From 2ac1948030b549c9b93ede4fa390a3b7b3411a9f Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 27 Apr 2020 17:37:47 +0100 Subject: code formatting --- paper2remarkable/providers/html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper2remarkable/providers/html.py b/paper2remarkable/providers/html.py index d0d55f4..6e08f1c 100644 --- a/paper2remarkable/providers/html.py +++ b/paper2remarkable/providers/html.py @@ -48,7 +48,7 @@ code { font-family: 'Inconsolata'; font-size: .7rem; background: #efefef; } """ -def my_fetcher(url): +def url_fetcher(url): if url.startswith("//"): url = "https:" + url elif url.startswith("file:///"): @@ -120,7 +120,7 @@ class HTML(Provider): fp.write(html_article) font_config = weasyprint.fonts.FontConfiguration() - html = weasyprint.HTML(string=html_article, url_fetcher=my_fetcher) + html = weasyprint.HTML(string=html_article, url_fetcher=url_fetcher) css = weasyprint.CSS(string=CSS, font_config=font_config) html.write_pdf(filename, stylesheets=[css], font_config=font_config) -- cgit v1.2.3