04-26-2014, 02:53 AM | #1 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Paragraph separator
Hi,
I cleaned a book, using some regex to get rid of a lot of unwanted tags. Ex: Code:
<span face="Georgia">(.*?)</span> \1 To get rid of them, I just added a new regex which destroyed all of them, including the ones left in the text files, and then launched "Beautify all files" (Embellit tous les fichiers) which reinstates them only in the right places. (screenshot2 - normal code display) Maybe when performing a regex suppressing tags in the text files, it would be nice if the Calibre editor could check if there are still some unwanted separators left? Last edited by roger64; 04-26-2014 at 03:48 AM. |
04-26-2014, 02:59 AM | #2 |
creator of calibre
Posts: 44,409
Karma: 23977332
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There's no way for calibre to know when a line break is "unwanted". You should include the newline you want removed as part of your regular expression, for example:
<p.+</p>(\n)? Will remove <p> tag including an optional trailing newline. |
Advert | |
|
04-26-2014, 03:10 AM | #3 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thanks for this tip! It's far from obvious (at least for me). I will try it.
side note: By the way, many thanks too for correcting the French elided forms bug (spellchecker) in your last release and for uploading my corrections in the French translation file. |
04-26-2014, 03:17 AM | #4 |
creator of calibre
Posts: 44,409
Karma: 23977332
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You're welcome
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
<hr> as section separator? | orange! | ePub | 13 | 09-17-2013 03:31 PM |
Subgroup Separator | ilovejedd | Library Management | 8 | 03-03-2012 10:55 AM |
about paragraph breaks | arslonga | Calibre | 0 | 02-03-2012 05:03 AM |
Preference: Paragraph indent or a little paragraph spacing? | 1611mac | General Discussions | 48 | 11-11-2011 12:43 AM |
Use of comma as field separator and author_sort | meme | Development | 9 | 04-19-2011 04:26 PM |