List:Commits« Previous MessageNext Message »
From:mcbrown Date:September 5 2006 3:21pm
Subject:svn commit - mysqldoc@docsrva: r3236 - trunk/tools
View as plain text  
Author: mcbrown
Date: 2006-09-05 17:21:20 +0200 (Tue, 05 Sep 2006)
New Revision: 3236

Log:
Fixing FM formatter to replace all spaces in programlistings with !!space!!



Modified:
   trunk/tools/format-framemaker.pl


Modified: trunk/tools/format-framemaker.pl
===================================================================
--- trunk/tools/format-framemaker.pl	2006-09-05 14:54:28 UTC (rev 3235)
+++ trunk/tools/format-framemaker.pl	2006-09-05 15:21:20 UTC (rev 3236)
Changed blocks: 2, Lines Added: 27, Lines Deleted: 18; 1801 bytes

@@ -49,24 +49,8 @@
 
     if ($inpl)
     {
-        if ($line =~ m/<programlisting/)
-        {
-            my ($space) = ($line =~ m/<programlisting>(\s+)\S/);
-            if (defined($space))
-            {
-                my $replspace = '!!space!!' x length($space);
-                $line =~ s/<programlisting>($space)/<programlisting>$replspace/;
-            }
-        }
-        else
-        {
-            my ($space) = ($line =~ m/^(\s+)\S/);
-            if (defined($space))
-            {
-                my $replspace = '!!space!!' x length($space);
-                $line =~ s/^($space)/$replspace/;
-            }
-        }
+        $line =~ s/ /!!space!!/g;
+
         print $dest "$line!!CRLF!!\r\n";
 #        print $dest Encode::encode("utf8","$line!!CRLF!!\r\n");
     }

@@ -76,3 +60,28 @@
 #        print $dest Encode::encode("utf8","$line\n");
     }
 }
+
+#
+# Prefix space replacement only
+#
+# Replace Regex line with the following fragment
+# 
+# 
+#        if ($line =~ m/<programlisting/)
+#        {
+#            my ($space) = ($line =~ m/<programlisting>(\s+)\S/);
+#            if (defined($space))
+#            {
+#                my $replspace = '!!space!!' x length($space);
+#                $line =~ s/<programlisting>($space)/<programlisting>$replspace/;
+#            }
+#        }
+#        else
+#        {
+#            my ($space) = ($line =~ m/^(\s+)\S/);
+#            if (defined($space))
+#            {
+#                my $replspace = '!!space!!' x length($space);
+#                $line =~ s/^($space)/$replspace/;
+#            }
+#        }


Thread
svn commit - mysqldoc@docsrva: r3236 - trunk/toolsmcbrown5 Sep