Skip to content

Commit

Permalink
fix(tempus): don't use the re module if it doesn't exist (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed May 16, 2023
1 parent ea0497a commit 3c99638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neorg/modules/core/tempus/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and `to_lua_date(date) -> osdate`.
local module = neorg.modules.create("core.tempus")

-- NOTE: Maybe encapsulate whole date parser in a single PEG grammar?
local time_regex = vim.re.compile([[{%d%d?} ":" {%d%d} ("." {%d%d?})?]])
local _, time_regex = pcall(vim.re.compile, [[{%d%d?} ":" {%d%d} ("." {%d%d?})?]])

local timezone_list = {
"ACDT",
Expand Down

0 comments on commit 3c99638

Please sign in to comment.