View Single Post
Old 07-05-2016, 07:35 AM   #1
Phoebus
Member
Phoebus began at the beginning.
 
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;">
With an italics tag (so either just make it <i> or make the span class italics).

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>')]
Phoebus is offline   Reply With Quote