mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 13:08:31 +02:00
Use strict regex when timeformat_strict config true
This commit is contained in:
parent
455db728c0
commit
034e86762e
1 changed files with 3 additions and 1 deletions
|
@ -135,7 +135,9 @@ class Journal:
|
|||
# (2) if timeformat_strict is set to true.
|
||||
if self.config["timeformat"] == "%Y-%m-%d %H:%M":
|
||||
if self.config["timeformat_strict"]:
|
||||
date_blob_re = re.compile("(?:^|\n)\\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2})\\] ")
|
||||
date_blob_re = re.compile(
|
||||
"(?:^|\n)\\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2})\\] "
|
||||
)
|
||||
|
||||
last_entry_pos = 0
|
||||
for match in date_blob_re.finditer(journal_txt):
|
||||
|
|
Loading…
Add table
Reference in a new issue