You are here: PSPad forum > English discussion forum > Re: line break & spaces in source

Re: line break & spaces in source

#1 line break & spaces in source

Posted by: tsunami | Date: 05/16/2012 10:56 | IP: IP Logged

Dear all,
I am using PSPad for a while now.
But since some timeI found some mystic behavior, which I didn't have before.
When I formatted my source code to make it clearer eg

These line breaks and spaces are also in the front end. Especially in chrome it destroys the layout.
I'm programming php / css.
Is there somewhere a hidden option for "different" spaces?

Thanks for your efforts

Options: Reply | Quote | Up ^

#2 Re: line break & spaces in source

Posted by: pspad | Date: 05/16/2012 11:19 | IP: IP Logged

No, there is only one type of spaces - 32 Ascii
Spaces are kept in case when you enclose part of code with CODE or KBD tag

Options: Reply | Quote | Up ^

#3 Re: line break & spaces in source

Posted by: myf | Date: 05/18/2012 02:20 | IP: IP Logged

In fact, there are about twenty distinct whitespace characters specified in wide unicode, but in reality you can encounter just regular space, tab and non-breaking space (&nbsp;), the latter could ycrew anything, but is unlikely that it got into your sourcecode without your knowledge. You can check it easily: either turn on "View > Special chars" (regular spaces shows middot, non-breaking remain empty) or navigate to any suspicious part and look into statusbar: regular spaces shows "32 $0020".

Another thing is that as Jan wrote, even regular spaces may be significant under special circumstances (preformatted blocks) and refomatted source could screw something that relies on certain space-collapsing algorythm (especially in old browsers sometimes empty string node in DOM matters a lot to rendering).

Options: Reply | Quote | Up ^

Editor PSPad - freeware editor, © 2001 - 2015 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák