Skip to content

Commit 5043c41

Browse files
Declare markup highlights directy to avoid conflict
1 parent 6f73b46 commit 5043c41

File tree

2 files changed

+76
-99
lines changed

2 files changed

+76
-99
lines changed

lua/orgmode/colors/markup_highlighter.lua

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,6 @@ local function is_valid_markup_range(match, _, source, _)
131131
return
132132
end
133133

134-
-- Ignore conflicts with hyperlink or math
135-
for _, char in ipairs({ '[', '\\' }) do
136-
if start_node:type() == char or end_node:type() == char then
137-
return true
138-
end
139-
end
140-
141134
local start_line = start_node:range()
142135
local end_line = end_node:range()
143136

@@ -163,10 +156,6 @@ local function is_valid_hyperlink_range(match, _, source, _)
163156
if not start_node or not end_node then
164157
return
165158
end
166-
-- Ignore conflicts with markup
167-
if start_node:type() ~= '[' or end_node:type() ~= ']' then
168-
return true
169-
end
170159

171160
local start_line = start_node:range()
172161
local end_line = start_node:range()
@@ -185,10 +174,6 @@ end
185174

186175
local function is_valid_latex_range(match, _, source, _)
187176
local start_node_left, start_node_right, end_node = get_predicate_nodes(match, 3)
188-
-- Ignore conflicts with markup
189-
if start_node_left:type() ~= '\\' then
190-
return true
191-
end
192177
if not start_node_right or not end_node then
193178
return
194179
end

0 commit comments

Comments
 (0)