Skip to content

Commit

Permalink
Improve y-005
Browse files Browse the repository at this point in the history
  • Loading branch information
vr8hub authored and acabal committed Feb 22, 2024
1 parent bebf62b commit 18f072e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion se/se_epub_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2839,7 +2839,7 @@ def _lint_xhtml_typo_checks(filename: Path, dom: se.easy_xml.EasyXmlTree, file_c

# Check for commas or periods following exclamation or question marks. Exclude the colophon because we may have painting names with punctuation.
if special_file != "colophon":
typos = [node.to_string() for node in dom.xpath("//p[re:test(., '[!?][\\.,][^”’]')]")]
typos = [node.to_string() for node in dom.xpath("//p[re:test(., '[!?][\\.,]([^”’]|$)')]")]
if typos:
messages.append(LintMessage("y-005", "Possible typo: question mark or exclamation mark followed by period or comma.", se.MESSAGE_TYPE_WARNING, filename, typos))

Expand Down

0 comments on commit 18f072e

Please sign in to comment.