fix(injection): lower-case language name for markdown strings

This commit is contained in:
milanglacier 2024-05-17 04:34:52 -04:00 committed by GitHub
parent 4b8ea9fea6
commit 19ac9e8b5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -171,7 +171,7 @@ query.add_directive("set-lang-from-info-string!", function(match, _, bufnr, pred
if not node then
return
end
local injection_alias = vim.treesitter.get_node_text(node, bufnr)
local injection_alias = vim.treesitter.get_node_text(node, bufnr):lower()
metadata["injection.language"] = get_parser_from_markdown_info_string(injection_alias)
end, true)