| View previous topic :: View next topic |
| Author |
Message |
AlanStewart
Joined: 02 Jun 2006 Posts: 77
|
Posted: Sat Mar 29, 2008 8:39 pm Post subject: \n |
|
|
I have a registered version of 3.96o, which I just recently upgraded to via the usual way of overwriting over my 3.96n version of Zeus. I finally got around to trying out the new and improved \n support and noticed something a little odd, for me at least.
I was searching for instances of "<br>\n" and replacing them with "" (ie, getting rid of the lines I no longer wanted). Normally I would've expected that the lines would just disappear (what I wanted) but , because the line above the <br> is indented, I noticed that the line *below* the <br> ends up indented as well, after the replacement. I strongly suspect that this has to do with the smart indenting being a little too over-zealous in doing its job.
Let's see if I can do an example:
| Code: | xhtml_code
text
<br>
more_code
|
What I want to see is:
| Code: | xhtml_code
text
more_code
|
What I'm seeing is:
| Code: | xhtml_code
text
more_code
|
Hope that helps? |
|
| Back to top |
|
 |
jussij Site Admin
Joined: 13 Aug 2004 Posts: 1938
|
Posted: Mon Mar 31, 2008 12:27 am Post subject: |
|
|
Hi Alan,
| Quote: | | I strongly suspect that this has to do with the smart indenting being a little too over-zealous in doing its job. |
The search and replace has in fact work correctly, since you did not include the leading white space in the search.
The correct search string should have been: <br>\n[ ]+
But you have indirectly found a bug in the Zeus 3.96o beta, since the <br>\n[ ]+ search string was not being handled correctly by the beta version
This bug will be fixed in the official Zeus 3.96o release, due shortly
Cheers Jussi |
|
| Back to top |
|
 |
jussij Site Admin
Joined: 13 Aug 2004 Posts: 1938
|
|
| Back to top |
|
 |
AlanStewart
Joined: 02 Jun 2006 Posts: 77
|
Posted: Tue Apr 01, 2008 4:58 am Post subject: |
|
|
I *think* it's working now. Hard to say since my original request was buggy to begin with.
What I was searching for and replacing was actually working. The indenting I thought I was seeing was from the leading spaces no being removed. So that's all cool.
I did try searching for " +<br>\n" and replacing with "" and that gave me the results that I was expecting. However, this worked even *without* turning on the "Use Regular Expression" checkbox.
Also, because I left the "Replace with" box "empty" (ie. nothing in there), whenever I *next* open up the dialong box, the "Replace with" value is set to something that *isn't* "" and so I have to be extra vigilant that I don't do a global search'n'replace for "<br>" with "img". |
|
| Back to top |
|
 |
jussij Site Admin
Joined: 13 Aug 2004 Posts: 1938
|
Posted: Tue Apr 01, 2008 5:40 am Post subject: |
|
|
| Quote: | | so I have to be extra vigilant that I don't do a global search'n'replace for "<br>" with "img". |
If you did manage to run an incorrect replace all you can always just undo the last change made. No matter how many changes get made by the replace all, they will all be grouped, so they can all be undone by the single undo command
FWIW one of the habits I uses is to tick the repeat find on replace option and when I need to do a replace all I usually run a find, followed by a replace, followed by a replace all. I find this an easy way to check that the search and replace details have been defined correctly
Cheers Jussi |
|
| Back to top |
|
 |
|