[Po4a-commits] "po4a/lib/Locale/Po4a Docbook.pm,1.7,1.8"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Thu Nov 17 23:55:22 UTC 2005


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv10398/lib/Locale/Po4a

Modified Files:
	Docbook.pm 
Log Message:
The category of a tag specified on the command line must not be changed by
the default tags specified in the Docbook.pm module.
It was not possible to specify -o inline="<arg>".


Index: Docbook.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Docbook.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Docbook.pm	21 Oct 2005 19:10:29 -0000	1.7
+++ Docbook.pm	17 Nov 2005 23:55:20 -0000	1.8
@@ -88,7 +88,9 @@
 	$self->{options}{'tagsonly'}=1;
 	$self->{options}{'wrap'}=1;
 	$self->{options}{'doctype'}=$self->{options}{'doctype'} || 'docbook xml';
-	$self->{options}{'tags'}.='
+	my ($additional_tags, $additional_inline) = ("", "");
+	my $tag;
+	foreach $tag qw(
 		<abbrev>
 		<acronym>
 		<arg>
@@ -120,6 +122,7 @@
 		<refpurpose>
 		<releaseinfo>
 		<remark>
+		<replaceable>
 		<revnumber>
 		W<screen>
 		<screeninfo>
@@ -130,8 +133,12 @@
 		<synopfragmentref>
 		<term>
 		<title>
-		<titleabbrev>';
-	$self->{options}{'inline'}.='
+		<titleabbrev>) {
+		if ($self->{options}{'inline'} !~ /(^|\s+)\Q$tag\E(?:\s+|$)/) {
+			$additional_tags .= " $tag";
+		}
+	}
+	foreach $tag qw(
 		<action>
 		<affiliation>
 		<anchor>
@@ -207,7 +214,6 @@
 		<property>
 		<quote>
 		<remark>
-		<replaceable>
 		<returnvalue>
 		<revhistory>
 		<sgmltag>
@@ -227,7 +233,13 @@
 		<varname>
 		<wordasword>
 		<xref>
-		<year>';
+		<year>) {
+		if ($self->{options}{'tags'} !~ /(^|\s+)\Q$tag\E(?:\s+|$)/) {
+			$additional_inline .= " $tag";
+		}
+	}
+	$self->{options}{'tags'} .= $additional_tags;
+	$self->{options}{'inline'} .= $additional_inline;
 	$self->{options}{'attributes'}.='
 		lang';
 	$self->treat_options;




More information about the Po4a-commits mailing list