[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: mp4h warning in 2.0.8
- From: Denis Barbier <nospam@thanx>
- Date: Tue, 6 Nov 2001 12:54:39 +0100
On Tue, Nov 06, 2001 at 10:13:54AM +0100, Werner Heuser wrote:
> Hi,
>
> when using new WML 2.0.8 I get this warning:
>
> wml -DTEMPLATE=template_li.wml -O2 -o
> /dos/d/home/html_public/howtos.html howtos.wml
> /usr/lib/wml/exec/wml_p2_mp4h: WARNING:howtos.wml:0: variable stack not
> empty, it means <preserve> pushed more items than <restore> popped
>
> Finally I found out it is caused by:
>
> <ul>
> #use wml::std::toc style=ul
> <define-tag toc_section endtag=required whitespace=delete>
> <when <eq %0 2>>
> %body
> </when>
> </define-tag>
>
> {:
> [[s/\n\n+/\n/g]]
> [[s/<strong>//g]]
> [[s/<\/strong>//g]]
>
> [[s/<a href/<li><a href/g]]
> [[s/<\/a>/<\/a><\/li>/g]]
> <toc>
> :}
> </ul>
>
> This construct (programmed with help from Denis) builds a toc
> from <h2> tags only. It worked without warning in 2.0.7. I have
> looked up the WML source toc.wml, to solve the problem, but
> this is to much for me. The generated HTML code works well,
> so it's not a problem for me. But it may be of interest anyway.
Good catch, there was indeed a bug in wml::std::toc, which is there
for a long time. A fix is attached.
This extra check in wml_p2_mp4h seems to do its job, it's nice.
--
Denis Barbier
WML Maintainer
Index: toc.src
===================================================================
RCS file: /home/barbier/cvsdepot/wml/wml_include/std/toc.src,v
retrieving revision 1.16
diff -u -r1.16 toc.src
--- toc.src 2001/10/28 21:25:32 1.16
+++ toc.src 2001/11/06 11:48:35
@@ -114,11 +114,11 @@
=LT=a href=\"#ToC=LT=get-var __TOCCNT/>\"><strong>\
=LT=or =LT=get-var alt/> %body/>\
</strong></a>\
-=LT=restore alt/>\
=LT=/toc_section>\
<get-var toc_eol/>
:#ToC#}\
=LT=increment __TOCCNT/>\
+=LT=restore alt/>\
=LT=/define-tag>\
"
"=LT=" "<"