Thread: I need help!!!
View Single Post
Old 11-02-2010, 03:36 PM   #4
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by Jellby View Post
I would actually prefer the former markup, as it lets you control how each line wraps in narrow screens (typically, I'd have some largish negative indent; ideally, the wrapped part would be right-aligned)

I see you have spaces before the <p>, is that the case in every stanza and only inside stanzas?, then you could try something like:

search: "^ <p>(.*)</p>"
replace: " \1<br/>"

Otherwise, it gets complicated, I'd probably proceed stepwise: search for "<div class="stanza">, whatever, </p>\n<p>, whatever, </div>", where "whatever" stands for "any character, including newlines, multiple times, as few as possible", and repeat as needed.
Please remember that there are many <p>...</p> that are not part of the stanza. What you describe would change every <p>...</p> in the file. The changes must be limited to those <p>...</p> between <div class="stanza"> and </div>
crutledge is offline   Reply With Quote