Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 12-23-2012, 09:14 PM   #1
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
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
sherman is offline   Reply With Quote
Old 12-23-2012, 09:42 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 12-23-2012, 10:12 PM   #3
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
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...
sherman is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 11:16 AM.


MobileRead.com is a privately owned, operated and funded community.