[xml/sgml-commit] [SCM] linuxdoc-tools package for Debian. branch, experimental, updated. debian/0.9.60-23-g4a9b87a

Agustin Martin Domingo agmartin at debian.org
Tue May 12 20:43:11 UTC 2009


The following commit has been merged in the experimental branch:
commit 4a9b87a29b3cc14d0bdd976e910b81ba55406f57
Author: Agustin Martin Domingo <agmartin at debian.org>
Date:   Tue May 12 01:56:37 2009 +0200

    info: Better support for multiline author entries.

diff --git a/lib/mappings/info/mapping b/lib/mappings/info/mapping
index aa1b250..318c0e1 100644
--- a/lib/mappings/info/mapping
+++ b/lib/mappings/info/mapping
@@ -53,7 +53,7 @@
 </subtitle>
 
 <author>	+	"@author "
-</author>
+</author>	+	"@ldt_endauthor"
 
 <name>
 </name>
diff --git a/perl5lib/LinuxDocTools/InfoUtils.pm b/perl5lib/LinuxDocTools/InfoUtils.pm
index 3654a12..b4bd50b 100644
--- a/perl5lib/LinuxDocTools/InfoUtils.pm
+++ b/perl5lib/LinuxDocTools/InfoUtils.pm
@@ -125,6 +125,9 @@ sub info_parse_raw_file {
   my $lastnode  = "";
   my $sort      = 0;
 
+  my $inauthor;
+  my $authorline;
+
   open ($INPUT, "< $inputfile")
     or die "info-postASP: Could not open $inputfile for read. Aborting ...\n";
 
@@ -180,8 +183,22 @@ sub info_parse_raw_file {
       $labels{$_} = $lastnode;
     } elsif (s/^\@title\s+//){
       $docdata{'title'} = $_;
-    } elsif (s/^\@author\s+//){
-      $docdata{'author'} = $_;
+    } elsif (/^\@ldt_endauthor/){
+      $inauthor = '';
+      my @authors;
+      if ( @$docdata{'authors'} ){
+	@authors = @$docdata{'authors'};
+      }
+      push @authors, $authorline;
+      $docdata{'authors'} = \@authors;
+      $authorline = "";
+    } elsif ( s/^\@author\s+// ){
+      $inauthor = 1;
+      $authorline = $_;
+    } elsif ( $inauthor ){
+      next if m/^\s*$/;
+      s/^\s+//;
+      $authorline .= " $_ ";
     } elsif (s/^\@subtitle\s+//){
       $docdata{'subtitle'} = $_;
     } elsif (s/^\@ldt_translator\s+//){
@@ -274,11 +291,11 @@ sub info_write_preprocessed_file {
       }
     } elsif (s/^\@TOP//){
       $texinfo .= "\@node top\n"
-	. "\@top " . $docdata->{'title'} . "\n\n"
+	. "\@top " . $docdata->{'title'} . "\n"
 	. "\@example\n";
 
-      $texinfo .= $docdata->{'author'} . "\n"
-	if ( defined $docdata->{'author'} );
+      $texinfo .= join(' and ',@{$docdata->{'authors'}}) . "\n"
+	if ( @{$docdata->{'authors'}} );
 
       $texinfo .= $docdata->{'subtitle'} . "\n"
 	if ( defined $docdata->{'subtitle'} );

-- 
linuxdoc-tools package for Debian.



More information about the debian-xml-sgml-commit mailing list