From 63366303f6cf02ea65ac9ad9000e3e8467699234 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 16 Aug 2008 22:24:33 +0000 Subject: [PATCH] honor EscapeSpaces in 2nd overload of EscapeText() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54854 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Rewrite/HTMLRewrite.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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; -- 2.40.0