add quote to babycode, improve quote text

This commit is contained in:
2025-05-24 16:45:34 +03:00
parent 2773ba5243
commit 22f97dcc82
4 changed files with 55 additions and 31 deletions

View File

@ -37,6 +37,8 @@ function babycode.to_html(s, escape_html)
text = text:gsub("%[b%](.-)%[/b%]", "<strong>%1</strong>")
text = text:gsub("%[i%](.-)%[/i%]", "<em>%1</em>")
text = text:gsub("%[s%](.-)%[/s%]", "<del>%1</del>")
text = text:gsub("%[quote%](.-)%[/quote%]", "<blockquote>%1</blockquote>")
-- replace loose links
text = text:gsub("(https?://[%w-_%.%?%.:/%+=&~%@#%%]+[%w-/])", function(url)