Weird line spacing

1 view
Skip to first unread message

Markus

unread,
Jul 14, 2009, 9:19:23 AM7/14/09
to BoltWire
Hi everybody, welcome back, Dan,

When I create a page with just the following content:

test1
test2

test3
test4

I get a larger line spacing between test 1 and 2 than between test 3
and 4. Actually the line spacing between test 1 and 2 is the same as
between the two blocks of text.

Anyone able to explain this behavior to me?

Happy Tuesday,
Markus

The Editor

unread,
Jul 31, 2009, 10:31:14 AM7/31/09
to bolt...@googlegroups.com
This is a result of the new line spacing system which works closely
with css to get the proper display. In other words you only have to
adjust the css to fix this. You can see the same text displayed
properly at

http://www.boltwire.com/index.php?p=test.lines

Here are the critical css lines. I'm not sure exactly what the first
line is canceling out, but it doesn't seem to work without it. It's a
good css line in general however as it helps get all your browsers
closer to the same page..

* {margin: 0px; padding: 0px; }
p { margin-bottom: 15px; }
.vspace { margin-bottom: 15px; }

The last line deals primarily, I think with multiple line returns, to
give appropriate vertical spacing.

Looking at the html, it strikes me as a little awkward, but with the
right css it seems to work. It has also been about the hardest thing
along the way to get working. Therefore, I'm not to eager to dive in
there and start modifying things. :)

Cheers,
Dan


On Tue,

Markus

unread,
Jul 31, 2009, 11:36:27 AM7/31/09
to BoltWire
Okay, I got that line spacing right although it messes little bit with
my style sheet. Should be possible to get right both.

I can only underline "awkward". The source seems highly crazy to me...

<p><div class='preview' >one<br />
<p>two</p>
three<br />
four</div></p>
<textarea cols='60' rows='16' name='content' >one
two

three
four</textarea><br />

Are the line spacing mechanisms of other wikis and CMSs not applicable
to BoltWire due to its design?

Thanks a lot, Dan, for your help!

Regards, Markus

The Editor

unread,
Jul 31, 2009, 11:46:16 AM7/31/09
to bolt...@googlegroups.com
Ok, I got it now. Not sure how easy the fix is. The reason is the ! h1
markup requires an leading line return. I get around it in the
various zones by artifically adding one then stripping it out at the
end. Maybe I can do something similar with the preview option. Not
sure. Thanks for spotting this.

By the way, this is done so you don't have problems with exclamation
marks anywhere else in the code. But to allow it in situations like
this

[t][r][c]! Cell One[t]

Maybe there's another way around it. I'll dig around some.

Cheers,
Dan

Markus

unread,
Jul 31, 2009, 11:50:47 AM7/31/09
to BoltWire
Am I right that I have to find a way not to use margin-top for p in
#main?

When I have this:

#main p {
margin:0.5em 0 1em;
}
.vspace {
margin-bottom:1em;
}

Then due to the HTML, paragraph number four will not receive a top
margin of 0.5em (although #main p should match) but paragraph two
will. Therefore leading to different line spacings for virtually
similar paragraphs.

Regards, Markus

The Editor

unread,
Jul 31, 2009, 12:00:59 PM7/31/09
to bolt...@googlegroups.com
Just a note, I was able to change the last line of the preview
function to these lines and it seems to fix things. If anyone cares
to test around a bit that would be great.

$preview = BOLTdomarkup("\n$preview", $pageLink, '', '', false);
return BOLTescape("<div class='preview'>" . ltrim($preview) . "</div>");
// return BOLTescape(BOLTdomarkup("<div
class='preview'>$preview</div>", $pageLink, '', '', false));

Plans are to put this in the next release.

Cheers,
Dan

Markus

unread,
Jul 31, 2009, 12:13:26 PM7/31/09
to BoltWire
I think you mixed up those two threads. :)

Your preview fix seems to work beautifully.

Markus

The Editor

unread,
Jul 31, 2009, 12:48:59 PM7/31/09
to bolt...@googlegroups.com


Oops sorry about mixing the threads. :( My mistake...

As for this question, I think it works correctly except for the very
last line. Somehow that is not triggering as a paragraph. We may need
to modify the markup process to tag a couple extra line returns on the
end automatically, like we do with the opening line return. I notice
if you put two line returns and a space at the end, it seems to
display properly. I'll dig into this some more and see what we can't
come up with. The trick is to get it to work right in every possible
situation and intuitively. And without getting unexpected results.

As for other wiki systems, (which thread was that?) I think most
require some kind of notation to indicate a like break, like // or
something. But I've really wanted to make BoltWire almost as intuitive
as a word processor. Just drop the text in there and it handles all
the line spacing properly. And then to get proper xhtml on all of
that--well it's a challenge. So I think our issue is we are trying to
do more than other wiki's. But I've not researched many of them, so I
may be off. I just know we have veered off from the stance of
wiki-creole on this point at least.

Cheers,
Dan

Markus

unread,
Jul 31, 2009, 2:59:05 PM7/31/09
to BoltWire
> As for other wiki systems, (which thread was that?) I think most
> require some kind of notation to indicate a like break, like // or
> something.

I think you are right here. And, yes, I also agree that manual line
breaks are terribly uncool for a wiki system. Wikipedia for example is
such a candidate.

Dan, as always you'll find a way to make it work — be it sooner or
later. ;)

Best wishes, Markus
Reply all
Reply to author
Forward
0 new messages