Skip to content

Commit 122c534

Browse files
fix(tags): Allow non-ascii chars in tags
Fixes #856
1 parent 51ed95f commit 122c534

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/orgmode/files/elements/search.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ end
339339
---@return OrgTagMatch?, string
340340
function TagMatch:parse(input)
341341
local tag
342-
tag, input = parse_pattern(input, '[%w_@#%%]+')
342+
tag, input = parse_pattern(input, '[\128-\255%w_%%@#]+')
343343
if not tag then
344344
return nil, input
345345
end

lua/orgmode/utils/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ end
245245
function utils.parse_tags_string(tags)
246246
local parsed_tags = {}
247247
for _, tag in ipairs(vim.split(tags or '', ':')) do
248-
if tag:find('^[%w_%%@#]+$') then
248+
if tag:find('^[\128-\255%w_%%@#]+$') then
249249
table.insert(parsed_tags, tag)
250250
end
251251
end

0 commit comments

Comments
 (0)