From 37e1b0a6c088ecac2acb8ea0f22978cac0e3b5ed Mon Sep 17 00:00:00 2001 From: Robin Malley Date: Sun, 17 May 2020 13:17:15 -0400 Subject: [PATCH] Minor bugfix --- src/lua/parser_imageboard.lua | 60 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/lua/parser_imageboard.lua b/src/lua/parser_imageboard.lua index 9933deb..1e3c097 100644 --- a/src/lua/parser_imageboard.lua +++ b/src/lua/parser_imageboard.lua @@ -76,36 +76,36 @@ local grammar = P{ chunk = V"line"^0 * V"plainline" * V"ending" } -local text = [[ -this is **a big** test with ''italics''! -we need to > sanitize < things that could be tags -like really badly -words can include any'single item without=penalty -Can you use '''one tag ==within== another tag'''? -let's see if [spoiler]spoiler tags work[/spoiler] -things might even __go over -multiple lines__ blah -Let's test out those [code] -code tag,s and see how well -they work - here's ome - preformated - text -[/code] -> Or have blank lines +--local text = [[ +--this is **a big** test with ''italics''! +--we need to > sanitize < things that could be tags +--like really badly +--words can include any'single item without=penalty +--Can you use '''one tag ==within== another tag'''? +--let's see if [spoiler]spoiler tags work[/spoiler] +--things might even __go over +--multiple lines__ blah +--Let's test out those [code] +--code tag,s and see how well +--they work + --here's ome + --preformated + --text +--[/code] +--> Or have blank lines -one important thing is that greentext > should not start in the middle of a line -> this next line is a green text, what if I include **markup** inside it? -< and after '''it is''' a pinktext -> because of some of these restrictions **bold text -cannot go over multiple lines** in a green text -__and finally__ there might be some text with ''' -incomplete syntax with injection !!!! -]] +--one important thing is that greentext > should not start in the middle of a line +--> this next line is a green text, what if I include **markup** inside it? +--< and after '''it is''' a pinktext +--> because of some of these restrictions **bold text +--cannot go over multiple lines** in a green text +--__and finally__ there might be some text with ''' +--incomplete syntax with injection !!!! +--]] ---return function(text) - --return table.concat({grammar:match(text .. "\n")}," ") ---end -for k,v in pairs({grammar:match(text)}) do - print(k,":",v) +return function(text) + return table.concat({grammar:match(text .. "\n")}," ") end +--for k,v in pairs({grammar:match(text)}) do + --print(k,":",v) +--end