View Single Post
Old 08-20-2015, 04:20 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
First:: I *thought* calibre would turn hard line breaks into <br>'s, but now I am not so sure...


Anyway. So I entered this into the comments column in an empty book (test library ):

Code:
<p>I think your regex is fine...
<br><br>
calibre reformats the comments, putting them into a final div IIRC, and if you have multi-paragraph comments those need to be divided up somehow.
<br><br>
:bulb2: Paragraph == anytime there is a line-break.
<br><br>
In HTML mode line-breaks are collapsed into whitespace and paragraphs respect the &lt;p&gt; tags, but after nuking the tags if you have line-breaks calibre will do it's best to recreate a basic structure, and probably inserted hard line-breaks where it thought (:rolleyes:) you wanted them.</p>
Entered Bulk S&R
Search:
Code:
<br>
Replace: one standard space

Result:
Code:
<p>I think your regex is fine...
  
calibre reformats the comments, putting them into a final div IIRC, and if you have multi-paragraph comments those need to be divided up somehow.
  
:bulb2: Paragraph == anytime there is a line-break.
  
In HTML mode line-breaks are collapsed into whitespace and paragraphs respect the &lt;p&gt; tags, but after nuking the tags if you have line-breaks calibre will do it's best to recreate a basic structure, and probably inserted hard line-breaks where it thought (:rolleyes:) you wanted them.</p>
No <br>'s in sight.
eschwartz is offline   Reply With Quote