|  07-05-2016, 07:35 AM | #1 | 
| Member  Posts: 22 Karma: 10 Join Date: Aug 2015 Device: Kobo Aura H2O | 
				
				Problem replacing tags in custom recipe
			 
			
			Hello, I am newish to recipes but got some to work before. However I am having a problem replacing tags in a recipe. Some sections of text are blue and naturally these don't show up on an eBook reader. I have tried the re.compile function but it doesn't work for me at least how I do it: I want to swap the tag: Code: <span style="color: blue;"> Any advice, I couldn't find anything in search that worked? PS - I've tried a few variants of this, eg things like Code: preprocess_regexps = [(re.compile(r'<span style="color: blue;">', re.IGNORECASE), '<i>')] | 
|   |   | 
|  07-05-2016, 08:16 AM | #2 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			Just add remove_attributes = ['style'] to your recipe | 
|   |   | 
|  07-05-2016, 10:22 AM | #3 | 
| Member  Posts: 22 Karma: 10 Join Date: Aug 2015 Device: Kobo Aura H2O | 
			
			Thanks, I couldn't get that to work, but it did finally work when I changed the auto cleanup to False then it did.
		 | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| custom columns from only certain tags | areyou | Library Management | 2 | 12-15-2012 05:33 AM | 
| Replacing multiple tags over 2 lines | kmckinley | Sigil | 7 | 09-03-2011 10:34 PM | 
| Replacing tags after using them | hiperlink | Recipes | 2 | 03-28-2011 10:23 AM | 
| Custom recipe Tags/Category | riothamus | Recipes | 1 | 11-21-2010 10:42 AM | 
| A problem with custom recipe | joshdu1125 | Calibre | 1 | 05-03-2009 09:31 PM |