aboutsummaryrefslogtreecommitdiffstats
path: root/util/charset
diff options
context:
space:
mode:
authoralexeykruglov <alexeykruglov@yandex-team.ru>2022-02-10 16:45:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:38 +0300
commitf64e95a9eb9ab03240599eb9581c5a9102426a96 (patch)
treeb2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/charset
parent06361c53c4ca58f57007ea73fc399fc25664f13c (diff)
downloadydb-f64e95a9eb9ab03240599eb9581c5a9102426a96.tar.gz
Restoring authorship annotation for <alexeykruglov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/charset')
-rw-r--r--util/charset/wide.cpp12
-rw-r--r--util/charset/wide.h2
-rw-r--r--util/charset/wide_ut.cpp20
3 files changed, 17 insertions, 17 deletions
diff --git a/util/charset/wide.cpp b/util/charset/wide.cpp
index 49f49f5110..a287438ddd 100644
--- a/util/charset/wide.cpp
+++ b/util/charset/wide.cpp
@@ -580,7 +580,7 @@ void EscapeHtmlChars(TUtf16String& str) {
const TUtf16String& cs = str;
for (size_t i = 0; i < cs.size(); ++i)
- escapedLen += EscapedLen<insertBr>(cs[i]);
+ escapedLen += EscapedLen<insertBr>(cs[i]);
if (escapedLen == cs.size())
return;
@@ -606,11 +606,11 @@ void EscapeHtmlChars(TUtf16String& str) {
ent = &quot;
break;
default:
- if (insertBr && (cs[i] == '\r' || cs[i] == '\n')) {
- ent = &br;
- break;
- } else
- continue;
+ if (insertBr && (cs[i] == '\r' || cs[i] == '\n')) {
+ ent = &br;
+ break;
+ } else
+ continue;
}
res.append(cs.begin() + start, cs.begin() + i);
diff --git a/util/charset/wide.h b/util/charset/wide.h
index 1c23c8b4ec..04e6928aab 100644
--- a/util/charset/wide.h
+++ b/util/charset/wide.h
@@ -808,7 +808,7 @@ TUtf32String ToUpperRet(const TUtf32StringBuf text, size_t pos = 0, size_t count
TUtf32String ToTitleRet(const TUtf32StringBuf text, size_t pos = 0, size_t count = TWtringBuf::npos) Y_WARN_UNUSED_RESULT;
//! replaces the '<', '>' and '&' characters in string with '&lt;', '&gt;' and '&amp;' respectively
-// insertBr=true - replace '\r' and '\n' with "<BR>"
+// insertBr=true - replace '\r' and '\n' with "<BR>"
template <bool insertBr>
void EscapeHtmlChars(TUtf16String& str);
diff --git a/util/charset/wide_ut.cpp b/util/charset/wide_ut.cpp
index d20bde8f0d..d8f3233e73 100644
--- a/util/charset/wide_ut.cpp
+++ b/util/charset/wide_ut.cpp
@@ -809,9 +809,9 @@ public:
void TestEscapeHtmlChars() {
// characters from the first half of the ASCII table
- for (wchar16 c = 1; c < 0x7F; ++c) {
+ for (wchar16 c = 1; c < 0x7F; ++c) {
TUtf16String w(1, c);
- EscapeHtmlChars<false>(w);
+ EscapeHtmlChars<false>(w);
switch (c) {
case '<':
@@ -831,12 +831,12 @@ public:
break;
}
}
-
- for (wchar16 c = 1; c < 0x7F; ++c) {
+
+ for (wchar16 c = 1; c < 0x7F; ++c) {
TUtf16String w(1, c);
- EscapeHtmlChars<true>(w);
-
- switch (c) {
+ EscapeHtmlChars<true>(w);
+
+ switch (c) {
case '<':
UNIT_ASSERT(w == ASCIIToWide("&lt;"));
break;
@@ -856,10 +856,10 @@ public:
default:
UNIT_ASSERT(w == TUtf16String(1, c));
break;
- }
- }
+ }
+ }
}
-
+
void TestToLower() {
const size_t n = 32;
wchar16 upperCase[n];