texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/tp Texinfo/Parser.pm Texinfo/Convert/Te...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Parser.pm Texinfo/Convert/Te...
Date: Wed, 03 Aug 2011 21:42:06 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/08/03 21:42:06

Modified files:
        tp/Texinfo     : Parser.pm 
        tp/Texinfo/Convert: Text.pm 
        tp/t           : 03coverage_braces.t 
        tp/t/results/coverage_braces: uref_url.pl 
        tp/t/results/sectioning: at_commands_in_refs.pl 

Log message:
        Even better formattng of @uref and @url in Converter::Text.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.271&r2=1.272
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Text.pm?cvsroot=texinfo&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/03coverage_braces.t?cvsroot=texinfo&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/uref_url.pl?cvsroot=texinfo&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/at_commands_in_refs.pl?cvsroot=texinfo&r1=1.45&r2=1.46

Patches:
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.271
retrieving revision 1.272
diff -u -b -r1.271 -r1.272
--- Texinfo/Parser.pm   31 Jul 2011 23:21:49 -0000      1.271
+++ Texinfo/Parser.pm   3 Aug 2011 21:42:05 -0000       1.272
@@ -4306,7 +4306,7 @@
               if (address@hidden>{'args'}} 
                   or address@hidden>{'extra'}->{'brace_command_contents'}}
                   or 
!defined($explained->{'extra'}->{'brace_command_contents'}->[0])) {
-                $self->line_warning(
+                $self->line_warn(
                    sprintf($self->__("address@hidden missing first argument"),
                            $explained->{'cmdname'}), $line_nr);
               } else {

Index: Texinfo/Convert/Text.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Text.pm,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- Texinfo/Convert/Text.pm     3 Aug 2011 21:30:20 -0000       1.44
+++ Texinfo/Convert/Text.pm     3 Aug 2011 21:42:06 -0000       1.45
@@ -989,7 +989,15 @@
       $replacement = _normalise_space(convert($root->{'args'}->[2], $options))
         if (defined($root->{'args'}->[2]));
       return $replacement if (defined($replacement) and $replacement ne '');
-      return convert($root->{'args'}->[0], $options);
+      my $text;
+      $text = convert($root->{'args'}->[1], $options)
+        if (defined($root->{'args'}->[1]));
+      my $result = convert($root->{'args'}->[0], $options);
+      if (defined($text) and $text ne '') {
+        return "$result ($text)";
+      } else {
+        return $result;
+      }
     } elsif ($Texinfo::Common::explained_commands{$root->{'cmdname'}}
              and $root->{'args'} and $root->{'args'}->[1]) {
       my $explanation = convert($root->{'args'}->[1], $options);

Index: t/03coverage_braces.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/03coverage_braces.t,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- t/03coverage_braces.t       28 May 2011 23:27:39 -0000      1.35
+++ t/03coverage_braces.t       3 Aug 2011 21:42:06 -0000       1.36
@@ -28,6 +28,9 @@
 @url{--m,--n}
 @url{--o,--p,--q}
 '],
+['empty_commands',
+'@uref{} @abbr{} @email{} @code{} @~{} @dotless{} @verb{;;}
+'],
 ['nested', 'type the characters @kbd{l o g o u t @key{RET}}.'],
 ['nested_args', '@xref{@@ @samp{in samp}, descr @b{in b}, address@hidden, 
 @cite{manual}}.'],

Index: t/results/coverage_braces/uref_url.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage_braces/uref_url.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- t/results/coverage_braces/uref_url.pl       3 Aug 2011 21:30:20 -0000       
1.8
+++ t/results/coverage_braces/uref_url.pl       3 Aug 2011 21:42:06 -0000       
1.9
@@ -544,14 +544,14 @@
 ';
 
 
-$result_texts{'uref_url'} = '--a
+$result_texts{'uref_url'} = '--a (--b)
 --c
-
+ (--d)
 --g
 --i
 --k
 --l
---m
+--m (--n)
 --q
 ';
 

Index: t/results/sectioning/at_commands_in_refs.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/sectioning/at_commands_in_refs.pl,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- t/results/sectioning/at_commands_in_refs.pl 3 Aug 2011 21:30:21 -0000       
1.45
+++ t/results/sectioning/at_commands_in_refs.pl 3 Aug 2011 21:42:06 -0000       
1.46
@@ -18611,7 +18611,7 @@
 * 8.27in::
 * sansserif slanted::
 * indicateurl::
-* http://somewhere_aaa url ls::
+* http://somewhere_aaa url (text) ls::
 
 1  { }
 ******
@@ -18683,8 +18683,8 @@
 23 indicateurl
 **************
 
-24 http://somewhere_aaa url ls
-******************************
+24 http://somewhere_aaa url (text) ls
+*************************************
 
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]