add in stupid fix again
This commit is contained in:
+3
@@ -162,6 +162,9 @@ query.add_directive("set-lang-from-info-string!", function(match, _, bufnr, pred
|
|||||||
if not node then
|
if not node then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if not node.range then
|
||||||
|
return
|
||||||
|
end
|
||||||
local injection_alias = vim.treesitter.get_node_text(node, bufnr, {metadata=metadata}):lower()
|
local injection_alias = vim.treesitter.get_node_text(node, bufnr, {metadata=metadata}):lower()
|
||||||
metadata["injection.language"] = get_parser_from_markdown_info_string(injection_alias)
|
metadata["injection.language"] = get_parser_from_markdown_info_string(injection_alias)
|
||||||
end, opts)
|
end, opts)
|
||||||
|
|||||||
Reference in New Issue
Block a user