Make html-tidy conditionally set --show-body-only

Fixes an issue where tidy was aggressively removing parent tags from
non-partial html file.
This commit is contained in:
Henrik Lissner 2020-03-27 14:18:38 -04:00
parent 61faef7089
commit 9839aec1b2
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -28,7 +28,7 @@
'("tidy" "-q" "-indent"
"--tidy-mark" "no"
"--drop-empty-elements" "no"
"--show-body-only" "true" ; don't inject html/body tags
("--show-body-only" "%s" (if +format-region-p "true" "auto"))
("--indent-spaces" "%d" tab-width)
("--indent-with-tabs" "%s" (if indent-tabs-mode "yes" "no"))
("-xml" (memq major-mode '(nxml-mode xml-mode))))