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