Skip to content

Commit b6c26ee

Browse files
committed
check also spans in "id" attr check
1 parent 79e249d commit b6c26ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pphtml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,10 @@ def findPageRanges(self):
484484
pages_arabic = []
485485
pages_roman = []
486486

487-
# Look for <a> or <div> with 'id' attribute; \3 is the match
488-
pat1 = re.compile(r"""<(a|div)\s+[^>]*\bid=["'](page|pg)_?([\divxlcdm]+)["']""",
487+
# Look for <a>, <div>, <span> with 'id' attribute; \3 is the match
488+
pat1 = re.compile(r"""<(a|div|span)\s+[^>]*\bid=["'](page|pg)_?([\divxlcdm]+)["']""",
489489
re.IGNORECASE)
490-
# Look for span class=pagenum; \1 is the match
490+
# Alternately: look for span class=pagenum; \1 is the match
491491
pat2 = re.compile(r"""<span\s+[^>]*\bclass=["']pagenum['"].*>([^<]+)</span""",
492492
re.IGNORECASE)
493493

0 commit comments

Comments
 (0)