Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct cut-and-paste typo #653

Merged
merged 2 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion se/commands/shift_illustrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def shift_illustrations(plain_output: bool) -> int:
group.add_argument("-d", "--decrement", action="store_true", help="decrement the target illustration number and all following illustrations")
group.add_argument("-i", "--increment", action="store_true", help="increment the target illustration number and all following illustrations")
parser.add_argument("-a", "--amount", metavar="NUMBER", dest="amount", default=1, type=se.is_positive_integer, help="the amount to increment or decrement by; defaults to 1")
parser.add_argument("target_illustration_number", metavar="ENDNOTE-NUMBER", type=se.is_positive_integer, help="the illustration number to start shifting at")
parser.add_argument("target_illustration_number", metavar="ILLUSTRATION-NUMBER", type=se.is_positive_integer, help="the illustration number to start shifting at")
parser.add_argument("directory", metavar="DIRECTORY", help="a Standard Ebooks source directory")
args = parser.parse_args()

Expand Down
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
Loading