feat(styling): horizontal rule
This commit is contained in:
@@ -135,6 +135,7 @@ for index, value in ipairs(markdownFiles) do
|
||||
markdownFiles[index].content = markdownFiles[index].content:gsub("###%s*(.-)%s*<br>", "<h3>%1</h3>")
|
||||
markdownFiles[index].content = markdownFiles[index].content:gsub("##%s*(.-)%s*<br>", "<h2>%1</h2>")
|
||||
markdownFiles[index].content = markdownFiles[index].content:gsub("#%s*(.-)%s*<br>", "<h1>%1</h1>")
|
||||
-- TODO: h1 and h2 using == and --
|
||||
-- bold and italic text
|
||||
markdownFiles[index].content = markdownFiles[index].content:gsub("%*%*(.-)%*%*", "<b>%1</b>")
|
||||
markdownFiles[index].content = markdownFiles[index].content:gsub("%*(.-)%*", "<i>%1</i>")
|
||||
@@ -146,6 +147,8 @@ for index, value in ipairs(markdownFiles) do
|
||||
markdownFiles[index].content = markdownFiles[index].content:gsub("%[(.-)%]%((.-)%)", '<a href="%2">%1</a>')
|
||||
-- code
|
||||
markdownFiles[index].content = markdownFiles[index].content:gsub("`(.-)`", "<code>%1</code>")
|
||||
-- horizontal rule
|
||||
markdownFiles[index].content = markdownFiles[index].content:gsub("%-%-%-", "<hr>")
|
||||
|
||||
-- replace <!-- sitecontents --> with markdown file content
|
||||
local start_idx, end_idx = content:find("<!-- sitecontents -->", 1, true)
|
||||
|
||||
Reference in New Issue
Block a user