mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
fix: hex colors no longer tags (closes #115)
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
local Job = require("plenary.job")
|
local Job = require("plenary.job")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
local hashtag_re = "(^|\\s|'|\")#[a-zA-ZÀ-ÿ]+[a-zA-ZÀ-ÿ0-9/\\-_]*"
|
local hashtag_re =
|
||||||
|
"(^|\\s|'|\")((?!(#[a-fA-F0-9]{3})(\\W|$)|(#[a-fA-F0-9]{6})(\\W|$))#[a-zA-ZÀ-ÿ]+[a-zA-ZÀ-ÿ0-9/\\-_]*)"
|
||||||
local colon_re = "(^|\\s):[a-zA-ZÀ-ÿ]+[a-zA-ZÀ-ÿ0-9/\\-_]*:"
|
local colon_re = "(^|\\s):[a-zA-ZÀ-ÿ]+[a-zA-ZÀ-ÿ0-9/\\-_]*:"
|
||||||
local yaml_re =
|
local yaml_re =
|
||||||
"(^|\\s)tags:\\s*\\[([a-zA-ZÀ-ÿ]+[a-zA-ZÀ-ÿ0-9/\\-_]*(,\\s)*)*]"
|
"(^|\\s)tags:\\s*\\[([a-zA-ZÀ-ÿ]+[a-zA-ZÀ-ÿ0-9/\\-_]*(,\\s)*)*]"
|
||||||
@@ -19,7 +20,7 @@ local function command_find_all_tags(opts)
|
|||||||
re = yaml_re
|
re = yaml_re
|
||||||
end
|
end
|
||||||
|
|
||||||
return "rg", { "--vimgrep", "-o", re, "--", opts.cwd }
|
return "rg", { "--vimgrep", "--pcre2", "-o", re, "--", opts.cwd }
|
||||||
end
|
end
|
||||||
|
|
||||||
-- strips away leading ' or " , then trims whitespace
|
-- strips away leading ' or " , then trims whitespace
|
||||||
|
|||||||
Reference in New Issue
Block a user