-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Type error with YAML dates in frontmatter
When valid YAML dates or times are added to the page frontmatter, the YAML parser will already convert them to datetime.date or datetime.datetime objects. Example: --- date: 2023-04-12 --- This resulted in #strptime raising a TypeError because datetime.date isn't a string. This commit changes the plugin code to always accept a native datetime.date or datetime.datetime, even if meta_time_format is not set, and handle them without string parsing. Close #48
- Loading branch information
Showing
2 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters