Skip to content

Commit

Permalink
fix(filters): Fix parsing dates in tags filter
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak committed Jan 12, 2025
1 parent 7f975b1 commit 43361ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/orgmode/files/elements/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,9 @@ function PropertyMatch:parse(input)
end

-- Date property
date_str, input = parse_pattern(input, '"(<[^>]+>)"')
date_str, input = parse_pattern(input, '"<[^>]+>"')
if date_str then
date_str = date_str:sub(2, -2)
---@type string?, OrgDate?
local date_content, date_value
if date_str == '<today>' then
Expand All @@ -407,7 +408,7 @@ function PropertyMatch:parse(input)
else
date_content = date_str:match('^<([^>]+)>$')
if date_content then
date_value = Date.from_string(date_str)
date_value = Date.from_string(date_content)
end
end
end
Expand Down

0 comments on commit 43361ba

Please sign in to comment.