Vincent Massol wrote:
Hi,
This is our last chance to change this behavior. We've found several
places where having meaningful spaces are counter-productive:
* in table cells since we can't align table anymore. For example:
|= column1 |= column2
| this is some para | second column
| hello | world
(not sure this will be rendered nicely in mail but you see what I mean)
* in scripts since having meaningful spaces prevents us from aligning
velocity or groovy scripts. For ex we can't write:
#if (....)
#if (...)
do something
# end
#end
To see a better example have a look at
http://tinyurl.com/ahz669
What I think users real want are meaningful new lines but I see cons
overweighting pros for having meaningful white spaces. Thus I'm think
we should strip whitespaces at beginning and end of lines including
for line breaks.
I'm slightly less sure for multiple spaces between words but even
there I think we could strip them have users use {{{ }}} to put a non
breaking space for ex (or introduce a {{space/}} macro or another
special syntax although I'd rather we don't introduce a new syntax).
I think that users want WYSIWYG spaces to be meaningful, but this isn't
necessarily the same as wiki spaces. We should have a way to represent
nbsps in the wiki syntax, and not keep all spaces as meaningful.
Although the code will be bigger, it will allow wiki syntax users to
format the source code as they want, and it will allow WYSIWYG users to
format the result as they want.
+1 for making spaces non-meaningful.
+0.5 for ~{space} as a nbsp placehodler.
+0 for {{{ }}} as a meaningful space marker.
The question for {{{ }}} is how do we represent it in HTML?
- <tt> with white-space: pre from css;
-- Special care must be taken in the WYSIWYG to automatically split it
in two when the user starts typing text inside, special care to remove
the element once the user deletes all the spaces, special care to join
two adjacent blocks, etc.
- A series of nbsps, and the renderer/parser take care to transform from
and to {{{ }}}.
As for new lines, if we want to keep them meaningful, a good trick is to
end velocity lines with ##, as this causes the EoL to be considered part
of the comment.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/