in reply to Problem with CODE tags

Do you use Opera to post? It tends to add newlines after each line I write. What happens is that the code looks good when I preview it, but then newlines are added, that look like spaces in the preview (hence the preview looks fine). Then when I actually post the node the newlnes appear. If I edit the code some more newlines are added...

What I do then is I just write the text part of the node, preview it, then add the code just before submitting. If I need to edit the node later either I remove the spaces at the end of each line (for short snippets of code) or I just delete the code from the node and replace it with the one I keep in my text editor.

Replies are listed 'Best First'.
Re: Re: Problem with CODE tags
by mischief (Hermit) on Aug 21, 2001 at 18:07 UTC
    I use Opera too and I get the same problem. When you submit, Opera seems to add a ^M to the end of each \n, so the problem actually gets worse and worse every time you preview (double the newlines every time). You can actually delete the extraneous ^Ms cos although you can't see them, they're on the end of every line, so if you go to the end of the line and get rid of any whitespace you shouldn't see this problem.
      Unfortunately, I have been having this problem ever since I began using Opera, and tried to post code snippets througout various questions. Like what was said earlier, I have found that adding in the code after previewing tends to be faster than having to manually deleting every extra new line, especially if you have a very long question :-).

      Aside from that, the first I saw that there was something wrong with my code, it was funny, because each time I previewed it, it kept growing more spaced, and more spaced, and more spaced... it was funny, but you'd have to have been there.

      Andy Summers
Re: Re: Problem with CODE tags
by wylie (Novice) on Aug 21, 2001 at 16:40 UTC
    I have been using Opera and that's exactly the problem I've been experiencing!

    Thanks for the advice.