[Po4a-commits] "po4a/lib/Locale/Po4a Sgml.pm,1.83,1.84"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sun Nov 20 16:16:30 UTC 2005


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

Modified Files:
	Sgml.pm 
Log Message:
ddp/manuals.sgml/user/user.sgml includes a file with "&Files", without the
semi-colon.
Report and original patch by Thomas Huriaux.


Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- Sgml.pm	15 Nov 2005 16:10:39 -0000	1.83
+++ Sgml.pm	20 Nov 2005 16:16:27 -0000	1.84
@@ -618,8 +618,11 @@
 
     #   Change the entities including files in the document
     foreach my $key (keys %entincl) {
-        while ($origfile =~/^(.*?)&$key;(.*)$/s) {
+        # The external entity can be referenced as &key; or &key
+        # In the second case, we must differentiate &key and &key2
+        while ($origfile =~/^(.*?)&$key(?:;(.*)$|([^-_:.A-Za-z0-9].*)$|$)/s) {
 	    my ($begin,$end)=($1,$2);
+	    $end = "" unless (defined $end);
 
 	    # add the refs
 	    my $len  = $entincl{$key}{'length'}; # number added by the inclusion




More information about the Po4a-commits mailing list