summaryrefslogtreecommitdiff
path: root/tools/docs/docload.py
diff options
context:
space:
mode:
authorMagnus Hagander2018-04-03 13:04:47 +0000
committerMagnus Hagander2018-04-03 13:04:47 +0000
commit6e89d2fb6662929db9bd43e8a9c49cab01f480da (patch)
treeab3b479c911ae5c0ec3b633310f3918b3d25d9fa /tools/docs/docload.py
parentbc701e9ff42a337afcffd080b37960be7c80e89a (diff)
Turn off tidy indent on docs older than 11
It seems the newer tidy in Debian Stretch breaks with the output from the old docs toolchain, causing indention to happen inside <pre> blocks which clearly breaks rendering. Turn it off for thos, but keep it enabled for version 11 and up (at this point that's just dev), because the output becomes a lot easier to read when trying to debug things.
Diffstat (limited to 'tools/docs/docload.py')
-rwxr-xr-xtools/docs/docload.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/docs/docload.py b/tools/docs/docload.py
index 6cdadb8d..2965f9c8 100755
--- a/tools/docs/docload.py
+++ b/tools/docs/docload.py
@@ -40,6 +40,12 @@ def load_doc_file(filename, f):
else:
encoding = 'latin1'
+ # PostgreSQL prior to 11 used an older toolchain to build the docs, which does not support
+ # indented HTML. So turn it off on those, but keep it on the newer versions where it works,
+ # because it makes things a lot easier to debug.
+ if float(ver) < 11 and float(ver) > 0:
+ tidyopts['indent'] = 'no'
+
contents = unicode(rawcontents, encoding)
tm = re_titlematch.search(contents)