From 59271d0bc25bdb8bfc83e8939139ba3c8bffb8be Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Apr 2019 14:15:50 +0530 Subject: [PATCH] Edit book: Fix beautify not handling and tags correctly. Fixes #1826631 [Beautify does not work with colgroup](https://bugs.launchpad.net/calibre/+bug/1826631) --- src/calibre/ebooks/oeb/polish/pretty.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/polish/pretty.py b/src/calibre/ebooks/oeb/polish/pretty.py index 5d90fae260..f85e488f67 100644 --- a/src/calibre/ebooks/oeb/polish/pretty.py +++ b/src/calibre/ebooks/oeb/polish/pretty.py @@ -92,11 +92,11 @@ def pretty_opf(root): SVG_TAG = SVG('svg') BLOCK_TAGS = frozenset(map(XHTML, ( - 'address', 'article', 'aside', 'audio', 'blockquote', 'body', 'canvas', 'dd', + 'address', 'article', 'aside', 'audio', 'blockquote', 'body', 'canvas', 'col', 'colgroup', 'dd', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'li', 'noscript', 'ol', 'output', 'p', 'pre', 'script', 'section', 'style', 'table', 'tbody', 'td', - 'tfoot', 'thead', 'tr', 'ul', 'video', 'img'))) | {SVG_TAG} + 'tfoot', 'th', 'thead', 'tr', 'ul', 'video', 'img'))) | {SVG_TAG} def isblock(x):