Edit book: Fix beautify not handling <colgroup> and <th> tags correctly. Fixes #1826631 [Beautify does not work with colgroup](https://bugs.launchpad.net/calibre/+bug/1826631)

This commit is contained in:
Kovid Goyal 2019-04-27 14:15:50 +05:30
parent 9d268ed2c9
commit 59271d0bc2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -92,11 +92,11 @@ def pretty_opf(root):
SVG_TAG = SVG('svg') SVG_TAG = SVG('svg')
BLOCK_TAGS = frozenset(map(XHTML, ( 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', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form',
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'li',
'noscript', 'ol', 'output', 'p', 'pre', 'script', 'section', 'style', 'table', 'tbody', 'td', '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): def isblock(x):