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.

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:

MarkUp('fmt', 'headers', '/(^)(!{1,6})( *)(.*)\n?/me',
'BOLTMheaders("$2", "$4", "$1")');

Or modifing the function too:

MarkUp('fmt', 'headers', '/^(!{1,6})( *)(.*)\n?/me',
'BOLTMheaders("$1", "$3")');

function BOLTMheaders($number, $text) {
        $n = strlen($number);
        return "\n<h$n>$text</h$n>";
        }

Wait your opinions.

Cheers,
Marcos

--
http://alinome.nec

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