Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Development/talagan_ReaImGui Markdown.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
--[[
@description ReaImGui Markdown : A Markdown rendering library for ReaImGui
@version 0.1.11
@version 0.1.12
@author Ben 'Talagan' Babut
@license MIT
@donation https://www.paypal.com/donate/?business=3YEZMY9D6U8NC&no_recurring=1&currency_code=EUR
@links
Forum Thread https://forum.cockos.com/showthread.php?t=301055
@changelog
- [Bug Fix] Correcting offsets for inline elements, could lead to UTF-8 corruption on checkbox click
- [Bug Fix] Potential while(true) if using a space before a quote block
@metapackage
@provides
[nomain] talagan_ReaImGui Markdown/reaimgui_markdown/**/*.lua
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,15 @@ local function ParseMarkdown(markdown)
table.insert(ast.children, new_node("Header", nil, parse_inline(content, offset), { level = level }))
end
i = i + 1
-- Blockquote
-- Blockquote - use trimmed_line for detection but pass original lines
elseif trimmed_line:match(RX_BLOCKQUOTE) then
finalize_table()
local blockquotes, new_i = parse_blockquote(lines, i, #lines, markdown)
-- Store original lines but with leading spaces trimmed for blockquote parsing
local trimmed_lines = {}
for idx, l in ipairs(lines) do
trimmed_lines[idx] = trim(l)
end
local blockquotes, new_i = parse_blockquote(trimmed_lines, i, #trimmed_lines, markdown)
for _, blockquote in ipairs(blockquotes) do
table.insert(ast.children, blockquote)
end
Expand Down Expand Up @@ -835,4 +840,4 @@ local function ParseMarkdown(markdown)
return ast
end

return ParseMarkdown
return ParseMarkdown