Skip to content

Commit

Permalink
fix(renderer): Added the filetype finding function to the code blocks…
Browse files Browse the repository at this point in the history
… renderer

Ref: #72
  • Loading branch information
OXY2DEV committed Aug 8, 2024
1 parent 87310df commit d69122d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/markview/languages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ languages.get_name = function (name)
return string.gsub(name, "^%l", string.upper);
end

languages.get_fs = function (name)
languages.get_ft = function (name)
if not name or name == "" then
return "Unknown";
elseif languages.reverse_map[name] then
Expand Down
4 changes: 2 additions & 2 deletions lua/markview/renderer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1052,8 +1052,8 @@ renderer.render_code_blocks = function (buffer, content, config_table)
})
end
elseif config_table.style == "language" then
local language = languages.get_fs(content.language);
local icon, hl = renderer.get_icon(content.language, config_table);
local language = languages.get_ft(content.language);
local icon, hl = renderer.get_icon(language, config_table);
local block_length = content.largest_line;

local languageName;
Expand Down

0 comments on commit d69122d

Please sign in to comment.