\n

If reporting a bug with the Zeus editor please post the details here. Please do not post questions here.
AlanStewart
Posts: 77
Joined: Fri Jun 02, 2006 6:52 pm

\n

Postby AlanStewart » Sat Mar 29, 2008 8:39 pm

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: Select all

   xhtml_code
      text
   <br>
   more_code


What I want to see is:

Code: Select all

   xhtml_code
      text
   more_code


What I'm seeing is:

Code: Select all

   xhtml_code
      text
      more_code


Hope that helps?

jussij
Site Admin
Posts: 2230
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Mon Mar 31, 2008 12:27 am

Hi Alan,
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

jussij
Site Admin
Posts: 2230
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Mon Mar 31, 2008 11:46 pm

The latest Zeus patch fixes this bug and it can be found here: http://www.zeusedit.com/forum/viewtopic.php?t=1790

Cheers Jussi

AlanStewart
Posts: 77
Joined: Fri Jun 02, 2006 6:52 pm

Postby AlanStewart » Tue Apr 01, 2008 4:58 am

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".

jussij
Site Admin
Posts: 2230
Joined: Fri Aug 13, 2004 5:10 pm

Postby jussij » Tue Apr 01, 2008 5:40 am

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


Return to “Reporting a Bug”

Who is online

Users browsing this forum: No registered users and 0 guests

cron