On 13/12/05, Uwe Brauer <oub(a)mat.ucm.es> wrote:
In order to describe what I have in mind, let me use
the following
notation
[] denotes an empty line
:H: denotes a hard newline
:S: denotes a soft newline
Can you just clarify what you mean by "soft newline" and "hard
newline" here? I can think of three types of wrapping that are
relevant to our discussion:
1) ASCII (or Unicode, ISO-8859-x or whatever) newline characters
(either CR, LF, or both, depending on the editting environment)
2) [X]HTML newline tags - <br />, and in a sense also <p>
3) on-screen wrapping which isn't stored in the file in any way, as
available in most modern text editors and browser textarea widgets
[which is what I'd call "soft wrapping", which is why I got a little
confused]
Of these, MediaWiki doesn't need to (indeed, *can't*) know about type
(3), because it is purely an aspect of the display in the editor -
unless the editor actually adds characters [type (1)], the file will
not be changed by turning such wrapping on and off. HTML renderers
also ignore type (1), so that you can format your sourcecode nicely
without altering the result. The question is whether (or rather, when)
MediaWiki should convert type (1) newlines into type (2) tags so that
they actually show up in the browser.
- could I add soft newlines in the other
paragraphs such that
they are displayed nicely in my editor, or is this risky
since I might destroy the formating of the
paragraphs. Since my possibility 3. Is buggy I would be
interested in an answer to the problem
If by "soft newlines" you mean what I've called type (1) - i.e. the
ASCII newline characters produced by pressing "return" - then yes,
current behaviour is for MediaWiki to treat these as though they
didn't exist, unless there are two of them in a row. Of course, what
looks nice in your editor may look horrible in someone else's, so
playing with the display wrapping in your editor (type (3)) might be
marginally more sociable, but the actual page output should be the
same either way.
Manually using type (2) - that is, putting "<br />" in the middle of
paragraphs, or even "<p>foo</p>" to separate paragraphs - is
generally
frowned upon unless absolutely necessary because it makes the source
ugly and potentially rather hard to follow [for non-HTML geeks]. "<br
/>" is occasionally useful, though, because there's no other way of
doing it, and in some places you really only want a new line, not a
new paragraph.
Does this make any kind of sense and answer your question?
--
Rowan Collins BSc
[IMSoP]