feat(styling): line breaks
This commit is contained in:
@@ -122,6 +122,11 @@ for index, value in ipairs(markdownFiles) do
|
|||||||
local htmlFile = io.open(workDir .. "/public/" .. markdownFiles[index].fileName .. ".html", 'w')
|
local htmlFile = io.open(workDir .. "/public/" .. markdownFiles[index].fileName .. ".html", 'w')
|
||||||
if htmlFile then
|
if htmlFile then
|
||||||
local content = indexFile
|
local content = indexFile
|
||||||
|
|
||||||
|
-- STYLING
|
||||||
|
-- line breaks
|
||||||
|
markdownFiles[index].content = markdownFiles[index].content:gsub("\r?\n", "<br>")
|
||||||
|
|
||||||
-- 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)
|
||||||
if start_idx and end_idx then
|
if start_idx and end_idx then
|
||||||
|
|||||||
Reference in New Issue
Block a user