2013-10-20 07:14:32 |
Slobberchopz |
bug |
|
|
added bug |
2013-10-20 07:16:33 |
Slobberchopz |
description |
Calibre 1.7 32bit, Windows 7 64 bit
When a stylesheet has a selector and styling for the body element, and htmlz conversion is set to inline, htmlz does not apply it.
I think the error is in the following file: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/ebooks/htmlz/oeb2html.py line 260
259 if not style['page-break-before'] == 'always':
260 style_a = 'page-break-before: always;' + ' ' if style_a else '' + style_a
I don't see any sense in line 260; it either sets `style_a` to page-break-before:always *and leaves out* the other styles, or sets it to itself, when it should be adding page-break-before:always??
It should be along the lines of:
style['page-break-before'] = 'always'
style_a = '%s' % style
if `style` is modifiable;
or
style_a = re.sub('page-break-before:[^;]*|', 'page-break-before:always;', style_a)
(the `|` being for when page-break-before doesn't yet exist in the string)
Thanks |
Calibre 1.7 32bit, Windows 7 64 bit
When a stylesheet has a selector and styling for the body element, and htmlz conversion is set to inline, htmlz does not apply it.
I think the error is in the following file: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/ebooks/htmlz/oeb2html.py line 260
259 if not style['page-break-before'] == 'always':
260 style_a = 'page-break-before: always;' + ' ' if style_a else '' + style_a
I don't see any sense in line 260; it either sets `style_a` to page-break-before:always *and leaves out* the other styles, or sets it to itself, when it should be adding page-break-before:always??
It should be along the lines of:
style['page-break-before'] = 'always'
style_a = '%s' % style
if `style` is modifiable;
or
style_a = re.sub('page-break-before:[^;]*;?|', 'page-break-before:always;', style_a)
(the `|` being for when page-break-before doesn't yet exist in the string)
Thanks |
|
2013-10-20 07:17:31 |
Slobberchopz |
description |
Calibre 1.7 32bit, Windows 7 64 bit
When a stylesheet has a selector and styling for the body element, and htmlz conversion is set to inline, htmlz does not apply it.
I think the error is in the following file: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/ebooks/htmlz/oeb2html.py line 260
259 if not style['page-break-before'] == 'always':
260 style_a = 'page-break-before: always;' + ' ' if style_a else '' + style_a
I don't see any sense in line 260; it either sets `style_a` to page-break-before:always *and leaves out* the other styles, or sets it to itself, when it should be adding page-break-before:always??
It should be along the lines of:
style['page-break-before'] = 'always'
style_a = '%s' % style
if `style` is modifiable;
or
style_a = re.sub('page-break-before:[^;]*;?|', 'page-break-before:always;', style_a)
(the `|` being for when page-break-before doesn't yet exist in the string)
Thanks |
Calibre 1.7 32bit, Windows 7 64 bit
When a stylesheet has a selector and styling for the body element, and htmlz conversion is set to inline, htmlz does not apply it.
I think the error is in the following file: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/ebooks/htmlz/oeb2html.py line 260
259 if not style['page-break-before'] == 'always':
260 style_a = 'page-break-before: always;' + ' ' if style_a else '' + style_a
I don't see any sense in line 260; it either sets `style_a` to page-break-before:always *and leaves out* the other styles, or sets it to itself, when it should be adding page-break-before:always??
It should be along the lines of:
style['page-break-before'] = 'always'
style_a = '%s' % style
if `style` is modifiable;
or
style_a = re.sub('page-break-before:[^;]*;?|', 'page-break-before:always;', style_a)
(the \;?` being for when it at the end of string with no semicolon and the `|` being for when page-break-before doesn't yet exist in the string)
Thanks |
|
2013-10-20 07:18:00 |
Slobberchopz |
description |
Calibre 1.7 32bit, Windows 7 64 bit
When a stylesheet has a selector and styling for the body element, and htmlz conversion is set to inline, htmlz does not apply it.
I think the error is in the following file: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/ebooks/htmlz/oeb2html.py line 260
259 if not style['page-break-before'] == 'always':
260 style_a = 'page-break-before: always;' + ' ' if style_a else '' + style_a
I don't see any sense in line 260; it either sets `style_a` to page-break-before:always *and leaves out* the other styles, or sets it to itself, when it should be adding page-break-before:always??
It should be along the lines of:
style['page-break-before'] = 'always'
style_a = '%s' % style
if `style` is modifiable;
or
style_a = re.sub('page-break-before:[^;]*;?|', 'page-break-before:always;', style_a)
(the \;?` being for when it at the end of string with no semicolon and the `|` being for when page-break-before doesn't yet exist in the string)
Thanks |
Calibre 1.7 32bit, Windows 7 64 bit
When a stylesheet has a selector and styling for the body element, and htmlz conversion is set to inline, htmlz does not apply it.
I think the error is in the following file: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/ebooks/htmlz/oeb2html.py line 260
259 if not style['page-break-before'] == 'always':
260 style_a = 'page-break-before: always;' + ' ' if style_a else '' + style_a
I don't see any sense in line 260; it either sets `style_a` to page-break-before:always *and leaves out* the other styles, or sets it to itself, when it should be adding page-break-before:always??
It should be along the lines of:
style['page-break-before'] = 'always'
style_a = '%s' % style
if `style` is modifiable;
or
style_a = re.sub('page-break-before:[^;]*;?|', 'page-break-before:always;', style_a)
(the `;?` being for when it at the end of string with no semicolon and the `|` being for when page-break-before doesn't yet exist in the string)
Thanks |
|
2013-10-20 07:30:38 |
Kovid Goyal |
calibre: status |
New |
Triaged |
|
2013-10-20 07:30:38 |
Kovid Goyal |
calibre: assignee |
|
John Schember (user-none) |
|
2013-10-20 14:40:45 |
John Schember |
calibre: status |
Triaged |
Fix Committed |
|
2013-10-20 15:18:15 |
Kovid Goyal |
calibre: status |
Fix Committed |
Fix Released |
|