Skip to content

Commit

Permalink
chore: Use plain string matching (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jubnzv committed Dec 25, 2023
2 parents 2654caf + 9bcec93 commit 2c32e2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/mdeval.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ end
-- Parses start line to get code of the language.
-- For example: `#+BEGIN_SRC cpp` returns `cpp`.
local function get_lang(start_line)
local start_pos = string.find(start_line, code_block_start())
local start_pos = string.find(start_line, code_block_start(), 1, true)
local len = string.len(code_block_start())
return string.sub(start_line, start_pos + len):gsub("%s+", "")
end
Expand Down

0 comments on commit 2c32e2f

Please sign in to comment.