diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-27 17:37:47 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-27 17:37:47 +0100 |
| commit | 2ac1948030b549c9b93ede4fa390a3b7b3411a9f (patch) | |
| tree | 95dee95581661bd061e5f497331e2ad283e3e287 | |
| parent | Merge branch 'sirupsen-print-macos' (diff) | |
| download | paper2remarkable-2ac1948030b549c9b93ede4fa390a3b7b3411a9f.tar.gz paper2remarkable-2ac1948030b549c9b93ede4fa390a3b7b3411a9f.zip | |
code formatting
| -rw-r--r-- | paper2remarkable/providers/html.py | 4 |
1 files 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) |
