Skip to content

Commit

Permalink
fix(markdown): replace <code>. Fixes folke#424
Browse files Browse the repository at this point in the history
  • Loading branch information
folke authored and willothy committed Aug 19, 2023
1 parent c40c28b commit c47329e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/noice/text/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ function M.conceal_escape_characters(buf, ns, range)
end
end

-- This is a <code>test</code> **booo**
---@param text string
---@param opts? MarkdownFormatOptions
function M.parse(text, opts)
opts = opts or {}
---@type string
text = text:gsub("</?pre>", "```"):gsub("\r", "")
text = text:gsub("</?pre>", "```"):gsub("\r", ""):gsub("</?code>", "`")
text = M.html_entities(text)

---@type Markdown
Expand Down

0 comments on commit c47329e

Please sign in to comment.