-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix: Display correct author dates when birth/death years contain non-numeric characters #10420
Fix: Display correct author dates when birth/death years contain non-numeric characters #10420
Conversation
…numeric characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @SharkyBytes ! A few pieces of feedback to make the logic a little clearer 👍
71e8994
to
77636cd
Compare
for more information, see https://pre-commit.ci
Hi @cdrini, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes #10352
Fix: Display correct author dates when birth/death years contain non-numeric characters
Technical
-> Updated the
extract_year
method inhelpers.py
to handle non-numeric characters in birth/death dates.-> Modified the
BookByline.html
template to ensure proper display of dates, even when non-numeric characters (e.g., "19xx") are present.-> Added an optional
int_only
parameter to theextract_year
method to avoid breaking changes in other parts of the codebase.Testing
-> Verify that the author's dates are displayed correctly without empty brackets.
-> Run the test suite to ensure no regressions:
Screenshot
What I changed -:

Stakeholders
@cdrini