From: Ted Kremenek Date: Tue, 8 Apr 2008 22:28:15 +0000 (+0000) Subject: When substituting tabs during HTMLification, only add " " when we are X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ce32cb52b19102216f3120b81b4de5227b8d5f0;p=clang When substituting tabs during HTMLification, only add " " when we are "escaping" spaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49404 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp index 25444bf89e..8bc44e3a81 100644 --- a/lib/Rewrite/HTMLRewrite.cpp +++ b/lib/Rewrite/HTMLRewrite.cpp @@ -42,7 +42,12 @@ void html::EscapeText(Rewriter& R, unsigned FileID, bool EscapeSpaces) { case '\t': { SourceLocation Loc = SourceLocation::getFileLoc(FileID, FilePos); - R.ReplaceText(Loc, 1, "    ", 6*4); + + if (EscapeSpaces) + R.ReplaceText(Loc, 1, "    ", 6*4); + else + R.ReplaceText(Loc, 1, " ", 4); + break; }