Skip to content

Commit

Permalink
fix(org): Support additional options in BEGIN_SRC blocks
Browse files Browse the repository at this point in the history
Get only the first word after code_block_start in get_lang
  • Loading branch information
jubnzv authored Sep 19, 2024
2 parents 2c32e2f + b71d341 commit 79df3e7
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 @@ -289,7 +289,7 @@ end
local function get_lang(start_line)
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+", "")
return string.sub(start_line, start_pos + len):match("%w+")
end

-- Returns indentation length for the string `s`.
Expand Down

0 comments on commit 79df3e7

Please sign in to comment.