Skip to content

Commit

Permalink
Fix isBadItem in ArabicNumbersListLabelsDetectionAlgorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Jan 22, 2025
1 parent 0f2db13 commit 9294e40
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ class ArabicNumberInformation {
private boolean isBadItem(ListItemTextInfo listItem) {
String item = listItem.getListItem();
String nextSubstring = item.substring(start);
int nextNumberOfStartZeros = getNumberOfStartZeros(nextSubstring);
int nextArabicNumberStartLength = getRegexStartLength(nextSubstring);
if (nextSubstring.length() == nextNumberOfStartZeros + nextArabicNumberStartLength && listItem.hasOneLine()) {
if (nextSubstring.length() == nextArabicNumberStartLength && listItem.hasOneLine()) {
return true;
}
if (item.matches(DOUBLE_REGEX) && listItem.hasOneLine()) {
Expand Down

0 comments on commit 9294e40

Please sign in to comment.