html::EscapeText (using the Rewriter) now replaces tabs by default.

llvm-svn: 49982
This commit is contained in:
Ted Kremenek 2008-04-20 01:02:33 +00:00
parent ff2367c0c9
commit 076d13387d
2 changed files with 3 additions and 11 deletions

View 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,

View 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