mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Workaround for anchor rendering bug in ADE
This commit is contained in:
parent
8f863ee7a2
commit
59bf676dc0
@ -791,6 +791,8 @@ class Processor(Parser):
|
||||
css += '\n\n' + self.opts.override_css
|
||||
css += '\n\n' + 'body {margin-top: 0pt; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt;}'
|
||||
css += '\n\n@page {margin-top: %fpt; margin-bottom: %fpt; margin-left: %fpt; margin-right: %fpt}'%(self.opts.margin_top, self.opts.margin_bottom, self.opts.margin_left, self.opts.margin_right)
|
||||
# Workaround for anchor rendering bug in ADE
|
||||
css += '\n\na { color: inherit; text-decoration: inherit; cursor: default; }\na[href] { color: blue; text-decoration: underline; cursor:pointer; }'
|
||||
if self.opts.remove_paragraph_spacing:
|
||||
css += '\n\np {text-indent: 2.1em; margin-top:1pt; margin-bottom:1pt; padding:0pt; border:0pt;}'
|
||||
self.override_css = self.css_parser.parseString(self.preprocess_css(css))
|
||||
|
Loading…
x
Reference in New Issue
Block a user