Number of spaces allowed after punctuation

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
WilliamWallace
Posts: 3
Joined: Tue Feb 22, 2005 2:23 pm

Number of spaces allowed after punctuation

Post by WilliamWallace »

First, thanks for a neat application.

However, I am writing this because I prefer two spaces after sentence ending punctuation. Yet, Serendipity seems to be removing one of the sapces. Is there a setting to remove this feature?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Number of spaces allowed after punctuation

Post by garvinhicking »

This is not s9y removing, but HTML. HTML reduces any amount of spaces to a single space. There's nothing you can do about it, but to get used to the standard of one space.

This applies to all HTML applications, not just Serendipity...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
WilliamWallace
Posts: 3
Joined: Tue Feb 22, 2005 2:23 pm

Re: Number of spaces allowed after punctuation

Post by WilliamWallace »

Perhaps what you write is true at a low level, but it is not true at higher levels. Other applications preserve spaces. Frontpage, for example, preserves spaces.

Any other thoughts? If FrontPage can preserve spaces (they insert  , but I am not sure if that is portable in other non MS browsers), perhaps Serendipity could be compelled to do the same if it doesn't already. Perhaps this needs to be moved to a feature request?
garvinhicking wrote:This is not s9y removing, but HTML. HTML reduces any amount of spaces to a single space. There's nothing you can do about it, but to get used to the standard of one space.

This applies to all HTML applications, not just Serendipity...

Regards,
Garvin
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Number of spaces allowed after punctuation

Post by garvinhicking »

Yes, of course you could replace spaces with ' '. By doing that you will of course screw up HTML code, sine <a href=...> is invalid HTML. It would take very much performance and work to create a abstraction for detecting if blanks are within or outside a HTML tag.

You can also not compare Serendipity to Frontpage: Serendipity is an application used within the WebBrowser, wheras Frontpage is a seperate WYSIWYG application. Frontpage does thus not need to create this RegExp, since it can distinguish on an interface level which is their own HTML code and which is User input.

Have a look at phpBB, this forum software - it also shrinkwraps more than one space together...to be honest I'd more advise you to adapt to the standard of using single spacing.

You can also wrap all your text within a <pre>...</pre> HTML container, then your whitespaces will be preserved. Or you adapt your style.css stylesheet and make use of "white-space: pre" attribute to the CSS class .serendipityEntry...but that will affect ALL whitespaces, not only those after punctuation characters.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply