![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Request regarding CSS generation
Hi,
I have a small (?) request for the developers, if they/anyone is interested. Currently the CSS generated by the conversion engine does not include a semi-colon after the last declaration. Now I know that this is all perfectly fine and legal. However, it makes performing search & replace on calibre generated CSS a real PITA, as one often has to run two searches to ensure all instances are found and changed. Or one searches an end declaration and forgets about the semi-colon on others. My request is is it possible for all CSS declarations to end with a semi-colon? Thank you |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,195
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The CSS is generated by a library and not directly under calibre control. In theory the library could be patched, but that's rather more effort than it is worth. Why does the lack of a semi-colon cause problems when using a regex? You should use multi-line mode, for example,
(?m)some-expression.*;?$ will match a css declarationregrardless of whether it ends with a semi-colon or not. |
![]() |
![]() |
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Thanks for the quick reply Kovid
That's ok, not a big issue if it's not a quick alteration. Often I'm doing a quick copy/paste, rather than trying to worry about regex. But maybe I should look into that a bit more, and be just a little less lazy... |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature request : using a custom css file | Bertrand | Writer2ePub | 8 | 12-28-2019 11:46 AM |
Feature Request - custom CSS style | gentoosiast | EPUBReader | 1 | 12-14-2012 03:26 AM |
one more css help request | arslonga | Conversion | 1 | 07-13-2012 09:48 AM |
CSS visiblility setting throws off TOC generation in MOBI | Guido Henkel | Calibre | 1 | 11-02-2010 05:16 AM |
CSS visiblility setting throws of TOC generation in MOBI | Guido Henkel | Calibre | 0 | 11-01-2010 06:13 PM |