View Single Post
Old 06-23-2010, 01:22 PM   #17
Kivgaen
Enthusiast
Kivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enough
 
Kivgaen's Avatar
 
Posts: 38
Karma: 608
Join Date: Aug 2009
Location: Toronto
Device: all devices
Quote:
Originally Posted by Valloric View Post
That will fail to match p elements that have embedded spans in them (or <i>, <b> etc.). It would just silently ignore the whole element.

You should really use "<p class="h1">(.+)</p>" with minimal matching.
By the way -- I think there's a find and replace bug using the above in a document with multiple .xhtml files.

I tried the expression "<p class="h1">(.+)</p>" with minimal matching, and selecting "regular expression", and "all" radio buttons. When looking at the "current file", I found the first chapter heading, clicked "replace" and it appeared to work fine.

Then I changed it to "All files", and found NO matches. Yet when I selected the next file (find and replace window still open), I switched to Code View, and clicked "Find Next" again, and found the heading for Chapter 2!!.

I did the above process for the next 6 chapters, and then closed the find and replace window. Next I selected the TOC editor to find that there were NO headings in my table of contents. All of the changes I had made in the previous steps had vanished!

This was using the mac version, 0.2.3. I'm testing it on a PC now and if it's a problem there too I'll issue a defect report. But maybe I've done something wrong?

Cheers,

Luise
Kivgaen is offline   Reply With Quote