mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Check book: Nicer handling of line offsets
Apparently some errors from the CSS checker library reference line numbers, so rather than using an offset prepend extra newlines. Fixes #2009735 [Private bug](https://bugs.launchpad.net/calibre/+bug/2009735)
This commit is contained in:
parent
491ee6ad98
commit
e4e199e213
@ -205,6 +205,9 @@ def create_job(name, css, line_offset=0, is_declaration=False, fix_data=None):
|
||||
if is_declaration:
|
||||
css = 'div{\n' + css + '\n}'
|
||||
line_offset -= 1
|
||||
if line_offset > 0:
|
||||
css = ('\n' * line_offset) + css
|
||||
line_offset = 0
|
||||
return Job(name, css, line_offset, fix_data)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user