From 742a97998ac42fd6d5870712709ffbe5ba708176 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Mon, 11 Jun 2018 20:32:49 +0100 Subject: [PATCH] Set tidylib's wrap option to 68, rather than to 0. --- NEWS | 2 ++ rawdoglib/rawdog.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 161290b..98db7e8 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ URL (as --dump does for feedparser). The location of BASE_OPTIONS has changed in pytidylib 0.3.2; rather than trying to change it, override the corresponding options explicitly. +The meaning of tidylib's wrap option has also changed, so set a sensible +default value. - rawdog 2.22 diff --git a/rawdoglib/rawdog.py b/rawdoglib/rawdog.py index 5731593..10a5535 100644 --- a/rawdoglib/rawdog.py +++ b/rawdoglib/rawdog.py @@ -150,7 +150,9 @@ def sanitise_html(html, baseurl, inline, config): "alt-text": "", "doctype": "strict", "force-output": 1, - "wrap": 0, + # In tidy 0.99, wrap=0 means don't wrap. + # In tidy 5, wrap=0 means wrap to width 0. + "wrap": 68, } call_hook("mxtidy_args", config, args, baseurl, inline) call_hook("tidy_args", config, args, baseurl, inline) -- 2.35.1