feat(styling): headers
This commit is contained in:
@@ -126,6 +126,10 @@ for index, value in ipairs(markdownFiles) do
|
|||||||
-- STYLING
|
-- STYLING
|
||||||
-- line breaks
|
-- line breaks
|
||||||
markdownFiles[index].content = markdownFiles[index].content:gsub("\r?\n", "<br>")
|
markdownFiles[index].content = markdownFiles[index].content:gsub("\r?\n", "<br>")
|
||||||
|
-- headers
|
||||||
|
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>")
|
||||||
|
|
||||||
-- replace <!-- sitecontents --> with markdown file content
|
-- replace <!-- sitecontents --> with markdown file content
|
||||||
local start_idx, end_idx = content:find("<!-- sitecontents -->", 1, true)
|
local start_idx, end_idx = content:find("<!-- sitecontents -->", 1, true)
|
||||||
|
|||||||
Reference in New Issue
Block a user