On Fri, Feb 20, 2009 at 5:29 AM, Hans <[email protected]> wrote:
>
> Have you looked at http://www.boltwire.com/index.php?p=test.linebreak_test
>
> This morning going there first, not logged in, I see
>
> (bullet) login
> (bullet) register
> [if ! (! login)]* view
> (bullet) createsearch
> (bullet) print

The conditional may be showing up because there is not a closing [if].

I didn't remember being able to use parenthesis like this in
conditionals--but evidently you can. Just tested on a simpler case.
Regardless, should be equivalent to [if login]

> (bullet) means square black bullet.
> The [if ! login] markup is not evaluated and shown as text.
>
> I got the same on my machine, whatever variation I try, even changing
> the position regards to line breaks, trying backticks, etc.
>
> [if login] always renders fine. Changing the first to [if login] makes
> the next [else] appear as not rendered plain text [if ! (! login)]   -
> these conditionals drive me nuts!
>
> Can you verify that ther eis a bug in it somewhere?

I just looked at
http://www.boltwire.com/index.php?p=test.conditonals_and_linebreaks_2
and noticed a slight mistake (a single missing line return near the
top of the list) when not logged in. Made a slight fix to your markup.
Looks like it's working now.

Sorry the ` idea didn't work. Though the line returns are escaped, it
still causes the bullets to fail the markup pattern, at least fail as
a single bullet block. I was afraid it might do that.

Don't think there is a bug in the bullets code, though have been one
of the more challenging markups to code in BoltWire. I think the
problem is just getting use to how line breaks are handled in
BoltWire.

Also, I usually use the conditionals at the start of the line like this:

[if false]* one
* two
* three
[else]* four
* five
[if]* six
* seven
[if true]* eight
* nine
* ten
[if][if true]* eleven
* twelve
[if]

It should generate your list all in a single ul element. I think the
problem you had with your initial conditional was the missing line
return I mentioned above.

Cheers,
Dan

P.S. I think we could change the html output to retain line returns by
putting this in a config file. Seems to work. Perhaps it should be the
default setting...

MarkUp('end', 'linebreaks', '/([\n]+)/e', 'BOLTMlines("$1")."\n"');

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to