[pmwiki-users] How do I control $HTMLVSpace?
John Rankin
john.rankin at affinity.co.nz
Thu Aug 25 16:49:50 CDT 2005
On Friday, 26 August 2005 7:16 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Thu, Aug 25, 2005 at 10:00:54AM +1200, John Rankin wrote:
>> On Thursday, 25 August 2005 3:55 AM, Jonathan Scott Duff <duff at pobox.com> wrote:
>> >On Wed, Aug 24, 2005 at 01:07:43PM +1200, John Rankin wrote:
>> >> Is there a way to ask pmwiki to insert something other
>> >> than $HTMLVSpace to space out a list?
>> >>
>> >> * item 1
>> >>
>> >> * item 2
>> [...]
>> So the only answer I have been able to think of is an 'after
>> block' rule that looks for
>>
>> <p class='vspace'></p>(<\/tbook:.*?>)?<tbook:(.*?)>
>>
>> and turns it into (for example; actual output depends on $2)
>>
>> $1<tbook:$2 skip='big'>
>>
>> But it seems to me that a better way would be to create
>> correct xml markup in the first place.
>
>Unfortunately, according to many people "correct xml markup"
>doesn't really exist here, because we're conflating semantics
>(list item) with presentation (a blank line before the list
>item).
The DTD we are using controls this with (for example)
<item skip='value'>text</item>
So by 'correct' I mean 'conforms to the DTD'. The DTD
designer is perhaps closer to the semantic intent, as no
blank lines are harmed in the making of the document.
>
[snip]
>
>Also note that in 2.0.beta55 the internal representation of "blank line"
>has changed a bit; blank lines are now represented by '<:vspace>'
>instead of a line containing only whitespace characters. (Yes,
>I know this has the unfortunate potential of breaking a few
>scripts, but it was the least of several evils. Let me know what
>recipes break as a result and I'll take it upon myself to create the
>appropriate fix for each.)
>
This looks promising. I think it will solve the problem.
Right now, this is what we do for e.g. bullet lists:
$BlockMarkups['itemize'] =
array('<tbook:itemize><tbook:item>','</tbook:item><tbook:item>',
'</tbook:item></tbook:itemize>',1);
## bullet lists
Markup('^*','block','/^(\\*+)/','<:itemize,$1>');
Then we do:
## honour list spacing
Markup('skip','>^<:',
"/<p class='vspace'><\/p>(<\/tbook:item><tbook:(?:item|term))>/",
'$1 skip="med">');
Question
========
So do I instead do something like:
Markup('skip','wheredoesitgo?',
"/<:vspace>(<\/tbook:item><tbook:(?:item|term))>/",
'$1 skip="med">');
If so, what is the correct 'wheredoesitgo' sequence?
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list