Set tidylib's wrap option to 68, rather than to 0.
authorAdam Sampson <ats@offog.org>
Mon, 11 Jun 2018 19:32:49 +0000 (20:32 +0100)
committerAdam Sampson <ats@offog.org>
Mon, 11 Jun 2018 19:32:49 +0000 (20:32 +0100)
NEWS
rawdoglib/rawdog.py

diff --git a/NEWS b/NEWS
index 161290b589e5b101d86a56b6f007aff5b77d67fc..98db7e8daac014ccb4cb4e2564f4944d59f20114 100644 (file)
--- 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
 
index 5731593459b5a12d909728b1628172aded4ae169..10a55350c3852e2afae971a23d58f4b45375d8fc 100644 (file)
@@ -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)