View Single Post
Old 12-01-2021, 02:13 PM   #10
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Since style="display: none;" and style="list-style-type: none;" are the closest epub 2 equivalents of most epub 3 hidden attributes, there's no preference setting for suppressing these attributes, and I won't add one.

If your friend doesn't like this behavior, they can simply delete the following lines marked in red from plugin.py or comment them out:

Code:
        #------------------------------------------
        # replace all HIDDEN attributes
        #-----------------------------------------
        hidden_tags = soup.find_all(re.compile('.*?'), {'hidden' : re.compile('.*?')}) 
        for hidden_tag in hidden_tags:
            print('<' + tag_value.replace('_', ':') + '>', 'hidden attribute deleted.')
            del hidden_tag['hidden']
            hidden_tag['style'] = 'display: none;'


and:

Code:
                # hide NAV toc list item marker 
                if tag_value == 'toc':
                    ordered_lists = tag.find_all('ol')
                    for ol in ordered_lists:
                        ol['style'] = 'list-style-type: none;'
Doitsu is offline   Reply With Quote