Hi Eric, this is pretty doable.
In IdFormatter class text:
change
instance formatter: [:text :request :response :shelf :book :page |
(formatter format: text request: request response: response shelf:
shelf book: book page: page), '<br>', String cr].
to
instance formatter: [:text :request :response :shelf :book :page |
(text = '')
ifTrue: ['<p>', String cr]
ifFalse: [(formatter format: text request: request response: response
shelf: shelf book: book page: page), String cr]].
I'm not sure that this is advisable though. For instance, in e-mail, I
can do a list
1) frog
2) duck
3) rabbit
and with your formatting it would show up as 1) frog 2) duck 3) rabbit.
Of course, in Swiki, you should be able to do
#frog
#duck
#rabbit
and everything will turn out okay.
Peace and Luck!
Je77
On Sun, Jan 07, 2001 at 10:49:22PM -0700, Eric Scharff wrote:
> This issue of swiki formatting keeps coming up... :)
>
> I want to change the swiki formatting so that it doesn't add a <br> after
> every text line ending. Instead, I want to only add a <br> if there is
> a blank line. Actually, ideally, I want to put a <p> after a blank line
> to mark the beginning of a paragraph.
>
> This is meant to emulate 'email conventions'-- a blank line marks the end
> of a paragraph. I want the web browser to be able to wrap paragraphs,
> even if the user pastes them in with line breaks.
>
> If I change IdFormatter class>>text: and remove the <br> there, I get rid
> of the <br> after each text line. But how can I insert a <br> or a <p>
> when the formatter encounters an all-whitespace line?
>
> And the advanced question is, how might I make this a configurable option?
> However, I think I know how to do that...
>
> Thanks,
>
> -Eric