This commit is contained in:
2025-11-19 21:45:36 -05:00
parent 5cfaddf479
commit aab31daa2e
9 changed files with 103 additions and 27 deletions

View File

@@ -121,39 +121,62 @@ function M:custom(str)
return self
end
function M:g(str)
self:custom(str)
return self
end
function M:h1(str)
str = str or ""
table.insert(self.parts, "<h1>" .. str .. "</h1>")
self:custom("<h1>" .. str .. "</h1>")
return self
end
function M:h2(str)
str = str or ""
table.insert(self.parts, "<h2>" .. str .. "</h2>")
self:custom("<h2>" .. str .. "</h2>")
return self
end
function M:h3(str)
str = str or ""
table.insert(self.parts, "<h3>" .. str .. "</h3>")
self:custom("<h3>" .. str .. "</h3>")
return self
end
function M:h4(str)
str = str or ""
table.insert(self.parts, "<h4>" .. str .. "</h4>")
self:custom("<h4>" .. str .. "</h4>")
return self
end
function M:h5(str)
str = str or ""
table.insert(self.parts, "<h5>" .. str .. "</h5>")
self:custom("<h5>" .. str .. "</h5>")
return self
end
function M:h6(str)
str = str or ""
table.insert(self.parts, "<h6>" .. str .. "</h6>")
self:custom("<h6>" .. str .. "</h6>")
return self
end
function M:p(str)
str = str or ""
table.insert(self.parts, "<p>" .. str .. "</p>")
return self
end
function M:note(content)
content = content or ""
self:custom('<div class="note">' .. content .. '</div>')
return self
end
function M:a(link, str)
str = str or ""
table.insert(self.parts, "<a href=\"" .. link .. "\">" .. str .. "</a>")
return self
end