Skip to content

Commit 09b0c91

Browse files
committed
fix Issue 1398
1 parent 15d4836 commit 09b0c91

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

api/baseapi.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -1477,11 +1477,7 @@ char* TessBaseAPI::GetHOCRText(int page_number) {
14771477
do {
14781478
const char *grapheme = res_it->GetUTF8Text(RIL_SYMBOL);
14791479
if (grapheme && grapheme[0] != 0) {
1480-
if (grapheme[1] == 0) {
1481-
hocr_str += HOcrEscape(grapheme);
1482-
} else {
1483-
hocr_str += grapheme;
1484-
}
1480+
hocr_str += HOcrEscape(grapheme);
14851481
}
14861482
delete []grapheme;
14871483
res_it->Next(RIL_SYMBOL);
@@ -1945,8 +1941,8 @@ void TessBaseAPI::SetDictFunc(DictFunc f) {
19451941
* Sets Dict::probability_in_context_ function to point to the given
19461942
* function.
19471943
*
1948-
* @param f A single function that returns the probability of the current
1949-
* "character" (in general a utf-8 string), given the context of a previous
1944+
* @param f A single function that returns the probability of the current
1945+
* "character" (in general a utf-8 string), given the context of a previous
19501946
* utf-8 string.
19511947
*/
19521948
void TessBaseAPI::SetProbabilityInContextFunc(ProbabilityInContextFunc f) {

0 commit comments

Comments
 (0)