From: Nico Weber Date: Sat, 16 Aug 2008 22:24:33 +0000 (+0000) Subject: honor EscapeSpaces in 2nd overload of EscapeText() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63366303f6cf02ea65ac9ad9000e3e8467699234;p=clang honor EscapeSpaces in 2nd overload of EscapeText() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54854 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp index 3cdc2863ab..f86f29d5b9 100644 --- a/lib/Rewrite/HTMLRewrite.cpp +++ b/lib/Rewrite/HTMLRewrite.cpp @@ -176,9 +176,14 @@ std::string html::EscapeText(const std::string& s, bool EscapeSpaces, break; case '\t': - if (ReplaceTabs) - for (unsigned i = 0; i < 4; ++i) - os << " "; + if (ReplaceTabs) { + if (EscapeSpaces) + for (unsigned i = 0; i < 4; ++i) + os << " "; + else + for (unsigned i = 0; i < 4; ++i) + os << " "; + } else os << c;