Skip to content

Commit

Permalink
Use alternative way to comment a block of code (using the c preproces…
Browse files Browse the repository at this point in the history
…sor).

#2268 (review)
Thanks @amitdo
  • Loading branch information
Shreeshrii committed Feb 26, 2019
1 parent 449f1cd commit 2f71fe2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/training/validate_grapheme.cpp
Expand Up @@ -15,12 +15,15 @@ bool ValidateGrapheme::ConsumeGraphemeIfValid() {
char32 ch = codes_[codes_used_].second;
const bool is_combiner =
cc == CharClass::kCombiner || cc == CharClass::kVirama;
// TODO: Reject easily detected badly formed sequences.
// https://github.com/tesseract-ocr/tesseract/pull/2266#issuecomment-467114751
// if (prev_cc == CharClass::kWhitespace && is_combiner) {
// if (report_errors_) tprintf("Word started with a combiner:0x%x\n", ch);
// return false;
//}
// TODO: Make this code work well with RTL text.
// See https://github.com/tesseract-ocr/tesseract/pull/2266#issuecomment-467114751
#if 0
// Reject easily detected badly formed sequences.
if (prev_cc == CharClass::kWhitespace && is_combiner) {
if (report_errors_) tprintf("Word started with a combiner:0x%x\n", ch);
return false;
}
#endif
if (prev_cc == CharClass::kVirama && cc == CharClass::kVirama) {
if (report_errors_)
tprintf("Two grapheme links in a row:0x%x 0x%x\n", prev_ch, ch);
Expand Down

0 comments on commit 2f71fe2

Please sign in to comment.