From e5f4026a68fadb3577ffc92117e6c4787ee01e86 Mon Sep 17 00:00:00 2001 From: murat Date: Tue, 16 Jun 2026 18:48:19 +0300 Subject: [PATCH] blockquote line by line checking --- luago.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/luago.lua b/luago.lua index 03880ad..a8a4f9d 100644 --- a/luago.lua +++ b/luago.lua @@ -126,7 +126,13 @@ for index, value in ipairs(markdownFiles) do -- STYLING local function styling(s) -- blockquote - s = s:gsub(">%s*(.-)%s*\r?\n", "
%1
") + -- s = s:gsub(">%s*(.-)%s*\r?\n", "
%1
") + local lines = {} + for line in s:gmatch("([^\n]*)\n?") do + local nline = line:gsub("^>%s*(.*)", "
%1
") + table.insert(lines, nline) + end + s = table.concat(lines, "\n") -- line breaks s = s:gsub("\r?\n", "
") -- headers @@ -150,6 +156,7 @@ for index, value in ipairs(markdownFiles) do s = s:gsub("`(.-)`", "%1") -- horizontal rule s = s:gsub("%-%-%-", "
") + -- TODO: ordered and unordered lists return s end