[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texi2html-cvs] texi2html ChangeLog texi2html.pl Tests/macros/s...
From: |
Patrice Dumas |
Subject: |
[Texi2html-cvs] texi2html ChangeLog texi2html.pl Tests/macros/s... |
Date: |
Wed, 07 Jun 2006 20:56:17 +0000 |
CVSROOT: /cvsroot/texi2html
Module name: texi2html
Changes by: Patrice Dumas <pertusus> 06/06/07 20:56:17
Modified files:
. : ChangeLog texi2html.pl
Tests/macros : simple_macro.texi
Tests/macros_res: expansion_order.passfirst
expansion_order.passtexi glossary.html
glossary.passfirst glossary.passtexi
simple_macro.html simple_macro.passfirst
simple_macro.passtexi
Log message:
* texi2html.pl: Accept empty value set by @set (bug #16774).
Don't eat the line after a macro without arg (bug #16773).
* Tests/*: test for those issues.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/ChangeLog?cvsroot=texi2html&r1=1.247&r2=1.248
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.pl?cvsroot=texi2html&r1=1.168&r2=1.169
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros/simple_macro.texi?cvsroot=texi2html&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros_res/expansion_order.passfirst?cvsroot=texi2html&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros_res/expansion_order.passtexi?cvsroot=texi2html&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros_res/glossary.html?cvsroot=texi2html&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros_res/glossary.passfirst?cvsroot=texi2html&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros_res/glossary.passtexi?cvsroot=texi2html&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros_res/simple_macro.html?cvsroot=texi2html&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros_res/simple_macro.passfirst?cvsroot=texi2html&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texi2html/Tests/macros_res/simple_macro.passtexi?cvsroot=texi2html&r1=1.3&r2=1.4
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texi2html/texi2html/ChangeLog,v
retrieving revision 1.247
retrieving revision 1.248
diff -u -b -r1.247 -r1.248
--- ChangeLog 29 May 2006 23:36:10 -0000 1.247
+++ ChangeLog 7 Jun 2006 20:56:17 -0000 1.248
@@ -1,3 +1,9 @@
+2006-06-07 Patrice Dumas <address@hidden>
+
+ * texi2html.pl: Accept empty value set by @set (bug #16774).
+ Don't eat the line after a macro without arg (bug #16773).
+ * Tests/*: test for those issues.
+
2006-05-17 Patrice Dumas <address@hidden>
* texi2html.pl, texi2html.init: rework image formatting,
Index: texi2html.pl
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.pl,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -b -r1.168 -r1.169
--- texi2html.pl 29 May 2006 23:36:10 -0000 1.168
+++ texi2html.pl 7 Jun 2006 20:56:17 -0000 1.169
@@ -59,7 +59,7 @@
#--##########################################################################
# CVS version:
-# $Id: texi2html.pl,v 1.168 2006/05/29 23:36:10 pertusus Exp $
+# $Id: texi2html.pl,v 1.169 2006/06/07 20:56:17 pertusus Exp $
# Homepage:
my $T2H_HOMEPAGE = "http://www.nongnu.org/texi2html/";
@@ -8936,13 +8936,16 @@
{
if (s/^{($VARRE)}//)
{
+ my $value = $1;
if ($state->{'arg_expansion'})
{
- add_prev($text, $stack, "address@hidden" . '{' . $1 .
'}');
+ add_prev($text, $stack, "address@hidden" .'{'. $value
.'}');
next;
}
next if ($state->{'ignored'});
- $_ = get_value($1) . $_;
+ my $expansion = "No value for $value";
+ $expansion = $value{$value} if (defined($value{$value}));
+ $_ = $expansion . $_;
}
else
{
@@ -8984,7 +8987,7 @@
$state->{'macro_name'} = $macro;
$state->{'macro_depth'} = 1;
}
- elsif ($#$ref >= 1)
+ elsif (($#$ref >= 1) or ($#$ref <0))
{ # no brace -> no arg
$_ = expand_macro ($macro, [], $_, $line_nr, $state);
return;
@@ -10804,13 +10807,6 @@
open_arg ('cmd_line', 0, $state);
}
-sub get_value($)
-{
- my $value = shift;
- return $value{$value} if ($value{$value});
- return "No value for $value";
-}
-
# finish @item line in @*table
sub add_term($$$$;$)
{
Index: Tests/macros/simple_macro.texi
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Tests/macros/simple_macro.texi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Tests/macros/simple_macro.texi 16 Jun 2003 14:41:24 -0000 1.2
+++ Tests/macros/simple_macro.texi 7 Jun 2006 20:56:17 -0000 1.3
@@ -234,5 +234,46 @@
==================================
+Define macro without arg
address@hidden
+@@macro test1
+test1
+@@end macro
address@hidden example
+
address@hidden test1
+test1
address@hidden macro
+
+Call with @address@hidden:
+
+==================================
+
address@hidden abc
+
+----------------------------------
+
+test1 abc
+
+==================================
+
+Call with something on the line
+
+==================================
+
address@hidden abc
+
+----------------------------------
+
+test1 abc
+
+==================================
+
+An empty set value
+
address@hidden myspace
+
+1 @value{myspace} 1
+
@contents
@bye
Index: Tests/macros_res/expansion_order.passfirst
===================================================================
RCS file:
/cvsroot/texi2html/texi2html/Tests/macros_res/expansion_order.passfirst,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Tests/macros_res/expansion_order.passfirst 22 Sep 2003 23:01:04 -0000
1.1
+++ Tests/macros_res/expansion_order.passfirst 7 Jun 2006 20:56:17 -0000
1.2
@@ -2,4 +2,3 @@
expansion_order.texi(,10)
expansion_order.texi(bidule,11) \arg\
expansion_order.texi(bidule,11)
-expansion_order.texi(bidule,11)
Index: Tests/macros_res/expansion_order.passtexi
===================================================================
RCS file:
/cvsroot/texi2html/texi2html/Tests/macros_res/expansion_order.passtexi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Tests/macros_res/expansion_order.passtexi 22 Sep 2003 23:01:04 -0000
1.1
+++ Tests/macros_res/expansion_order.passtexi 7 Jun 2006 20:56:17 -0000
1.2
@@ -2,4 +2,3 @@
expansion_order.texi(,10)
expansion_order.texi(bidule,11) \arg\
expansion_order.texi(bidule,11)
-expansion_order.texi(bidule,11)
Index: Tests/macros_res/glossary.html
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Tests/macros_res/glossary.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- Tests/macros_res/glossary.html 8 Apr 2006 22:40:16 -0000 1.11
+++ Tests/macros_res/glossary.html 7 Jun 2006 20:56:17 -0000 1.12
@@ -84,8 +84,7 @@
<dl compact="compact">
<dt> name1 <a name="id1"></a></dt>
<dd><p>text1, arg1
-</p>
-</dd>
+</p></dd>
<dt> name2 <a name="id2"></a></dt>
<dd><p>text2
</p></dd>
Index: Tests/macros_res/glossary.passfirst
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Tests/macros_res/glossary.passfirst,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Tests/macros_res/glossary.passfirst 15 Jan 2005 23:45:37 -0000 1.2
+++ Tests/macros_res/glossary.passfirst 7 Jun 2006 20:56:17 -0000 1.3
@@ -19,10 +19,8 @@
glossary.texi(,44) @node glossary
glossary.texi(,45) @chapter glossary
glossary.texi(glossary,46) @table @asis
-glossary.texi(glossary,46)
glossary.texi(glossary,46) @item name1 @anchor{id1}
glossary.texi(glossary,46) text1, arg1
-glossary.texi(glossary,46)
glossary.texi(glossary,46) @item name2 @anchor{id2}
glossary.texi(glossary,46) text2
glossary.texi(glossary,46) @end table
Index: Tests/macros_res/glossary.passtexi
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Tests/macros_res/glossary.passtexi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Tests/macros_res/glossary.passtexi 22 Sep 2003 23:01:04 -0000 1.1
+++ Tests/macros_res/glossary.passtexi 7 Jun 2006 20:56:17 -0000 1.2
@@ -19,10 +19,8 @@
glossary.texi(,44) @node glossary
glossary.texi(,45) @chapter glossary
glossary.texi(glossary,46) @table @asis
-glossary.texi(glossary,46)
glossary.texi(glossary,46) @item name1 @anchor{id1}
glossary.texi(glossary,46) text1, arg1
-glossary.texi(glossary,46)
glossary.texi(glossary,46) @item name2 @anchor{id2}
glossary.texi(glossary,46) text2glossary.texi(glossary,46)
glossary.texi(glossary,46) @end table
Index: Tests/macros_res/simple_macro.html
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Tests/macros_res/simple_macro.html,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- Tests/macros_res/simple_macro.html 8 Apr 2006 22:40:17 -0000 1.27
+++ Tests/macros_res/simple_macro.html 7 Jun 2006 20:56:17 -0000 1.28
@@ -271,6 +271,42 @@
</p>
<p>==================================
</p>
+<p>Define macro without arg
+</p><table><tr><td> </td><td><pre class="example">@macro test1
+test1
address@hidden macro
+</pre></td></tr></table>
+
+
+<p>Call with {}:
+</p>
+<p>==================================
+</p>
+<p>test1 abc
+</p>
+<p>———————————-
+</p>
+<p>test1 abc
+</p>
+<p>==================================
+</p>
+<p>Call with something on the line
+</p>
+<p>==================================
+</p>
+<p>test1 abc
+</p>
+<p>———————————-
+</p>
+<p>test1 abc
+</p>
+<p>==================================
+</p>
+<p>An empty set value
+</p>
+
+<p>1 1
+</p>
<hr size="6">
<a name="SEC_Contents"></a>
<table cellpadding="1" cellspacing="1" border="0">
Index: Tests/macros_res/simple_macro.passfirst
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Tests/macros_res/simple_macro.passfirst,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- Tests/macros_res/simple_macro.passfirst 15 Jan 2005 23:45:37 -0000
1.8
+++ Tests/macros_res/simple_macro.passfirst 7 Jun 2006 20:56:17 -0000
1.9
@@ -216,5 +216,42 @@
simple_macro.texi(,234)
simple_macro.texi(,235) ==================================
simple_macro.texi(,236)
-simple_macro.texi(,237) @contents
-simple_macro.texi(,238) @bye
+simple_macro.texi(,237) Define macro without arg
+simple_macro.texi(,238) @example
+simple_macro.texi(,239) @@macro test1
+simple_macro.texi(,240) test1
+simple_macro.texi(,241) @@end macro
+simple_macro.texi(,242) @end example
+simple_macro.texi(,243)
+simple_macro.texi(,247)
+simple_macro.texi(,248) Call with @address@hidden:
+simple_macro.texi(,249)
+simple_macro.texi(,250) ==================================
+simple_macro.texi(,251)
+simple_macro.texi(test1,252) test1 abc
+simple_macro.texi(,253)
+simple_macro.texi(,254) ----------------------------------
+simple_macro.texi(,255)
+simple_macro.texi(,256) test1 abc
+simple_macro.texi(,257)
+simple_macro.texi(,258) ==================================
+simple_macro.texi(,259)
+simple_macro.texi(,260) Call with something on the line
+simple_macro.texi(,261)
+simple_macro.texi(,262) ==================================
+simple_macro.texi(,263)
+simple_macro.texi(test1,264) test1 abc
+simple_macro.texi(,265)
+simple_macro.texi(,266) ----------------------------------
+simple_macro.texi(,267)
+simple_macro.texi(,268) test1 abc
+simple_macro.texi(,269)
+simple_macro.texi(,270) ==================================
+simple_macro.texi(,271)
+simple_macro.texi(,272) An empty set value
+simple_macro.texi(,273)
+simple_macro.texi(,275)
+simple_macro.texi(,276) 1 1
+simple_macro.texi(,277)
+simple_macro.texi(,278) @contents
+simple_macro.texi(,279) @bye
Index: Tests/macros_res/simple_macro.passtexi
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Tests/macros_res/simple_macro.passtexi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Tests/macros_res/simple_macro.passtexi 25 Nov 2003 10:35:20 -0000
1.3
+++ Tests/macros_res/simple_macro.passtexi 7 Jun 2006 20:56:17 -0000
1.4
@@ -216,5 +216,42 @@
simple_macro.texi(,234)
simple_macro.texi(,235) ==================================
simple_macro.texi(,236)
-simple_macro.texi(,237) @contents
-simple_macro.texi(,238) @bye
+simple_macro.texi(,237) Define macro without arg
+simple_macro.texi(,238) @example
+simple_macro.texi(,239) @@macro test1
+simple_macro.texi(,240) test1
+simple_macro.texi(,241) @@end macro
+simple_macro.texi(,242) @end example
+simple_macro.texi(,243)
+simple_macro.texi(,247)
+simple_macro.texi(,248) Call with @address@hidden:
+simple_macro.texi(,249)
+simple_macro.texi(,250) ==================================
+simple_macro.texi(,251)
+simple_macro.texi(test1,252) test1simple_macro.texi(test1,252) abc
+simple_macro.texi(,253)
+simple_macro.texi(,254) ----------------------------------
+simple_macro.texi(,255)
+simple_macro.texi(,256) test1 abc
+simple_macro.texi(,257)
+simple_macro.texi(,258) ==================================
+simple_macro.texi(,259)
+simple_macro.texi(,260) Call with something on the line
+simple_macro.texi(,261)
+simple_macro.texi(,262) ==================================
+simple_macro.texi(,263)
+simple_macro.texi(test1,264) test1simple_macro.texi(test1,264) abc
+simple_macro.texi(,265)
+simple_macro.texi(,266) ----------------------------------
+simple_macro.texi(,267)
+simple_macro.texi(,268) test1 abc
+simple_macro.texi(,269)
+simple_macro.texi(,270) ==================================
+simple_macro.texi(,271)
+simple_macro.texi(,272) An empty set value
+simple_macro.texi(,273)
+simple_macro.texi(,275)
+simple_macro.texi(,276) 1 1
+simple_macro.texi(,277)
+simple_macro.texi(,278) @contents
+simple_macro.texi(,279) @bye
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Texi2html-cvs] texi2html ChangeLog texi2html.pl Tests/macros/s...,
Patrice Dumas <=