Skip to content

Commit

Permalink
fix (sidebar) only display apply ext marks for codeblocks that can be…
Browse files Browse the repository at this point in the history
… applied (yetone#883)
  • Loading branch information
brewinski authored Nov 23, 2024
1 parent 9d2599d commit da41105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/avante/sidebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ local function parse_codeblocks(buf)
if in_codeblock and not lang_ then
table.insert(codeblocks, { start_line = start_line, end_line = i - 1, lang = lang })
in_codeblock = false
elseif lang_ then
elseif lang_ and lines[i - 1]:match("^%s*(%d*)[%.%)%s]*[Aa]?n?d?%s*[Rr]eplace%s+[Ll]ines:?%s*(%d+)%-(%d+)") then
lang = lang_
start_line = i - 1
in_codeblock = true
Expand Down

0 comments on commit da41105

Please sign in to comment.