View Single Post
Old 09-24-2014, 11:37 PM   #37
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by baochan View Post
Out of curiosity, is there a practical reasoning behind the .patch files using `backticks` instead of 'single' or "double" quotes? Or just a stylistic choice?
The original kpg.conf files used backquotes, so for compatibility I did the same with the patch32lsb program. I'm not sure why backquotes were used, but it might be to simplify the parsing of strings which contain single or double quotes, which many of the CSS fragments do.

Edit: The original and replacement strings can use single or double quotes as delimiters, but in that case you need to escape any instance of the delimiter that appears in the string. e.g.
Code:
replace_string = ABCDEF, `class="p0"`, `class="p1"`
would need to be written like this if using double quotes as delimiters:
Code:
replace_string = ABCDEF, "class=\"p0\"", "class=\"p1\""

Last edited by GeoffR; 09-24-2014 at 11:55 PM.
GeoffR is offline   Reply With Quote