Skip to content

Commit dd5ffaf

Browse files
Support case insensitive directives.
1 parent 8467332 commit dd5ffaf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lua/orgmode/org/autocompletion.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ local tags = {
3434
}
3535

3636
local filetags = {
37-
line_rgx = vim.regex([[^\#+FILETAGS:\s\+]]),
37+
line_rgx = vim.regex([[\c^\#+FILETAGS:\s\+]]),
3838
rgx = vim.regex([[:\([0-9A-Za-z_%@\#]*\)$]]),
3939
fetcher = function()
4040
return vim.tbl_map(function(tag)

lua/orgmode/parser/root.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ end
129129
---@param content Content
130130
---@return string
131131
function Root:process_root_content(content)
132-
if content:is_keyword() and content.keyword.name == 'FILETAGS' then
132+
if content:is_keyword() and content.keyword.name:upper() == 'FILETAGS' then
133133
local filetags = utils.parse_tags_string(content.keyword.value)
134134
for _, tag in ipairs(filetags) do
135135
if not vim.tbl_contains(self.tags, tag) then
@@ -279,7 +279,7 @@ end
279279

280280
function Root:get_archive_file_location()
281281
for _, content in ipairs(self.content) do
282-
if content:is_keyword() and content.keyword.name == 'ARCHIVE' then
282+
if content:is_keyword() and content.keyword.name:upper() == 'ARCHIVE' then
283283
return Config:parse_archive_location(self.file, content.keyword.value)
284284
end
285285
end

0 commit comments

Comments
 (0)