]> granicus.if.org Git - docbook-dsssl/commitdiff
More fixes to entity regex.
authorMichael Smith <xmldoc@users.sourceforge.net>
Sun, 30 Oct 2005 13:47:19 +0000 (13:47 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Sun, 30 Oct 2005 13:47:19 +0000 (13:47 +0000)
contrib/tools/cloak/cloak

index 6da8204223901a51c5f522d8e722b674709e4b89..803beb4ec3024a94a432c9fd051a10b7306e2767 100755 (executable)
@@ -55,7 +55,8 @@ if ($lines =~ m/$comment/ || $0 =~ m/uncloak/) {
 
     $lines = $lines . "\n<?" . $comment . " ?>\n";
 
-    $lines =~ s/(&\w+;)/<?ENT_ $1_ENT?>/g;      # cloak all entities
+    # cloak all entities
+    $lines =~ s/(\w*&[^;]+;\w*)|(&[^;]+;)/<?ENT_ $1_ENT?>/g;
 
     # uncloak entities in subset
     while ($lines =~ /(<!ENTITY[^']*?'[^']*?)<\?ENT_ (.+?)_ENT\?>(.*?'\s*>)/s) {