Skip to content

Commit 2c32e2f

Browse files
authored
chore: Use plain string matching (#9)
2 parents 2654caf + 9bcec93 commit 2c32e2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/mdeval.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ end
287287
-- Parses start line to get code of the language.
288288
-- For example: `#+BEGIN_SRC cpp` returns `cpp`.
289289
local function get_lang(start_line)
290-
local start_pos = string.find(start_line, code_block_start())
290+
local start_pos = string.find(start_line, code_block_start(), 1, true)
291291
local len = string.len(code_block_start())
292292
return string.sub(start_line, start_pos + len):gsub("%s+", "")
293293
end

0 commit comments

Comments
 (0)