]> granicus.if.org Git - clang/commitdiff
html::EscapeText (using the Rewriter) now replaces tabs by default.
authorTed Kremenek <kremenek@apple.com>
Sun, 20 Apr 2008 01:02:33 +0000 (01:02 +0000)
committerTed Kremenek <kremenek@apple.com>
Sun, 20 Apr 2008 01:02:33 +0000 (01:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49982 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/HTMLDiagnostics.cpp
include/clang/Rewrite/HTMLRewrite.h

index dbc156780f8d04397513fb867ef936e8fe8da04a..2f1b6e3676bed06b7fd665d449cede6843f73c0f 100644 (file)
@@ -224,13 +224,8 @@ void HTMLDiagnostics::HandlePathDiagnostic(const PathDiagnostic& D) {
   
   // Emit the HTML to disk.
 
-  for (RewriteBuffer::iterator I = Buf->begin(), E = Buf->end(); I!=E; ++I) {
-    // Expand tabs.
-    if (*I == '\t')
-      os << "   ";
-    else  
+  for (RewriteBuffer::iterator I = Buf->begin(), E = Buf->end(); I!=E; ++I)
       os << *I;
-  }
 }
 
 void HTMLDiagnostics::HandlePiece(Rewriter& R,
index a47d569eb27d119d5012cedd6c28934f2e783e49..1ebbade1613b79650dd9b58815b8ae5d126b67a3 100644 (file)
@@ -49,12 +49,9 @@ namespace html {
                       const char *StartTag, const char *EndTag);
   
   /// EscapeText - HTMLize a specified file so that special characters are
-  /// are translated so that they are not interpreted as HTML tags.  In this
-  /// version tabs are not replaced with spaces by default, as this can
-  /// introduce a serious performance overhead as the amount of replaced
-  /// text can be very large.
+  /// are translated so that they are not interpreted as HTML tags.
   void EscapeText(Rewriter& R, unsigned FileID,
-                  bool EscapeSpaces = false, bool ReplacesTabs = false);
+                  bool EscapeSpaces = false, bool ReplacesTabs = true);
 
   /// EscapeText - HTMLized the provided string so that special characters
   ///  in 's' are not interpreted as HTML tags.  Unlike the version of