Skip to content

Commit

Permalink
fix(tags): Allow non-ascii chars in tags
Browse files Browse the repository at this point in the history
Fixes #856
  • Loading branch information
kristijanhusak committed Jan 18, 2025
1 parent 51ed95f commit 122c534
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/orgmode/files/elements/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ end
---@return OrgTagMatch?, string
function TagMatch:parse(input)
local tag
tag, input = parse_pattern(input, '[%w_@#%%]+')
tag, input = parse_pattern(input, '[\128-\255%w_%%@#]+')
if not tag then
return nil, input
end
Expand Down
2 changes: 1 addition & 1 deletion lua/orgmode/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ end
function utils.parse_tags_string(tags)
local parsed_tags = {}
for _, tag in ipairs(vim.split(tags or '', ':')) do
if tag:find('^[%w_%%@#]+$') then
if tag:find('^[\128-\255%w_%%@#]+$') then
table.insert(parsed_tags, tag)
end
end
Expand Down

0 comments on commit 122c534

Please sign in to comment.