Register Guidelines E-Books Search Today's Posts Mark Forums Read

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
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
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: 25,913
Karma: 5035037
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
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Feature request : using a custom css file Bertrand Writer2ePub 7 12-22-2010 02:55 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 10:13 PM.


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