On Tue, Sep 9, 2008 at 8:44 AM, alinome.net <[EMAIL PROTECTED]> wrote:
>
> Hi all, here you are two suggestions for headers:
>
> 1) Leading spaces
>
> Though leading spaces in BoltWire headers are not shown by the browser
> (I don't know if it's an HTML rule or a convention), they do are in
> the HTML, what makes the page some bytes bigger :-) and, most
> important, is useless.
>
> The current headers markup is:
>
> MarkUp('fmt', 'headers', '/(^|>)(!{1,6})(.*)\n?/me',
> 'BOLTMheaders("$2", "$3", "$1")');
>
> I suggest to change it in a future release to:
>
> MarkUp('fmt', 'headers', '/(^|>)(!{1,6})( *)(.*)\n?/me',
> 'BOLTMheaders("$2", "$4", "$1")');
>
> That allows any number of leading spaces to be used (for source
> clarity) but they will not be included in the HTML.

Seems it might be easier to just ltrim the text, to eliminate any
leading spaces that way. It's easier for me than tinkering with regex,
which is not my favorite activity...  :)

> 2) Headers after HTML tags.
>
> It seems the current markup allows headers to follow HTML tags. But I
> realized that can cause problems. I created a markup to allow
> <address>:
>
> MarkUp('style', 'address', '/(&lt;|<)address(&gt;|>)(.*?)(&lt;|<)\/
> address(&gt;|>)/s', '<address>$3</address>');  // <address>
>
> And in the following source the "More bla bla" is wrongly rendered as
> a header:
>
> <address>Bla bla bla</address>!! More bla bla bla (not a header).
>
> I know it's quite strange to use "!!" there :-) but it's an example.
> That can happen in more normal cases.
>
> I'm not sure that headers not in a new line are useful. Are they used?
> If not, I suggest to remove that possibility in the markup rule:

The reason for this is probably some (admitted) messiness in the
BoltWire markup rules. I think some of the markup rules eat up
trailing \n, like

<box>
!! Header
Content...
</box>

Because <box> eats the trailing slash, the headers don't trigger
properly without accepting the >.  It probably also happens in other
markup rules also. To change it would mean carefully checking how
everything works and probably fixing several things.

I've been wanting to do a bit of tidying up anyway, as I'm getting
some imperfect line spacing on forms and blockquotes I think we can
improve. But fixing them will add/remove line returns on existing
sites that have adapted to BoltWire's quirks.

The goal has always been to make BoltWire as intuitive as possible,
but it's impossible to anticipate all possible expectations, and
sometimes making one thing easier makes other things harder. And in
the early days, some of these decisions were sort of ad libbed as I
went along. Or they've changed over time. So it's not all perfectly
consistent.

In sum, yeah, I'd like to fix it, but I'm likely to do it slowly--when
I have some time as it will probably be a bit disruptive. And I want
to be really careful as BoltWire is running very stable right now. I
know I'm opening a can of worms, but I'd entertain feedback on what
linespacing issues in BoltWire seem counter-intuitive to the group so
we can perhaps fix the whole issue a bit more systematically.

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
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