Skip to content

Commit 2f71fe2

Browse files
authored
Use alternative way to comment a block of code (using the c preprocessor).
#2268 (review) Thanks @amitdo
1 parent 449f1cd commit 2f71fe2

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/training/validate_grapheme.cpp

+9-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ bool ValidateGrapheme::ConsumeGraphemeIfValid() {
1515
char32 ch = codes_[codes_used_].second;
1616
const bool is_combiner =
1717
cc == CharClass::kCombiner || cc == CharClass::kVirama;
18-
// TODO: Reject easily detected badly formed sequences.
19-
// https://github.com/tesseract-ocr/tesseract/pull/2266#issuecomment-467114751
20-
// if (prev_cc == CharClass::kWhitespace && is_combiner) {
21-
// if (report_errors_) tprintf("Word started with a combiner:0x%x\n", ch);
22-
// return false;
23-
//}
18+
// TODO: Make this code work well with RTL text.
19+
// See https://github.com/tesseract-ocr/tesseract/pull/2266#issuecomment-467114751
20+
#if 0
21+
// Reject easily detected badly formed sequences.
22+
if (prev_cc == CharClass::kWhitespace && is_combiner) {
23+
if (report_errors_) tprintf("Word started with a combiner:0x%x\n", ch);
24+
return false;
25+
}
26+
#endif
2427
if (prev_cc == CharClass::kVirama && cc == CharClass::kVirama) {
2528
if (report_errors_)
2629
tprintf("Two grapheme links in a row:0x%x 0x%x\n", prev_ch, ch);

0 commit comments

Comments
 (0)