lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r768427 - /lucene/java/trunk/src/site/changes/changes2html.pl
Date Fri, 24 Apr 2009 22:21:38 GMT
Author: mikemccand
Date: Fri Apr 24 22:21:38 2009
New Revision: 768427

URL: http://svn.apache.org/viewvc?rev=768427&view=rev
Log:
LUCENE-1610: fix changes-to-html to properly format <code>...</code>

Modified:
    lucene/java/trunk/src/site/changes/changes2html.pl

Modified: lucene/java/trunk/src/site/changes/changes2html.pl
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/site/changes/changes2html.pl?rev=768427&r1=768426&r2=768427&view=diff
==============================================================================
--- lucene/java/trunk/src/site/changes/changes2html.pl (original)
+++ lucene/java/trunk/src/site/changes/changes2html.pl Fri Apr 24 22:21:38 2009
@@ -383,9 +383,11 @@
 
     for my $itemnum (1..$#{$items}) {
       my $item = $items->[$itemnum];
-      $item =~ s:&:&amp;:g;                            # Escape HTML metachars
-      $item =~ s:<:&lt;:g; 
-      $item =~ s:>:&gt;:g;
+      $item =~ s:&:&amp;:g;                   # Escape HTML metachars,
+      $item =~ s:<(?!/?code>):&lt;:gi;        #   but leave <code> tags intact
+      $item =~ s:(?<!code)>:&gt;:gi;          #   and add <pre> tags so that
+      $item =~ s:<code>:<code><pre>:gi;       #   whitespace is preserved
in the
+      $item =~ s:</code>:</pre></code>:gi;    #   output.
 
       # Put attributions on their own lines.
       # Check for trailing parenthesized attribution with no following period.



Mime
View raw message