Jump to content

Recommended Posts

The


tag has always done that, but it is also dependent on what kind of new-line character(s) are in the original source. I think, but have not specifically tried to pin it down, that it is when a the new line is not exactly a \r\n pair, in that order. Whatever condition triggers this, each \t has a \r\n added to it and each existing new-line has a \r\n added to it. I'm not sure if there is some javascript on the page that is running when you select the code in the block or if this is occurring in the javascript in the form editor or when the code is posted and it is TIDY'ed up.

 

One of the guru's suggested quoting the post and copy/pasting the code block out of it to get it without all the extra new-lines, which does work. (edit: perhaps php code is ran through a TIDY script when the post is displayed, but not when it is quoted.)

Link to comment
https://forums.phpfreaks.com/topic/266118-unwanted-linefeeds/#findComment-1363729
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.