add example lua stuff
This commit is contained in:
1 parent
a3ed5a9d91
commit
0e51b675c2
2 files changed
+24
No files matched your search
@@ -0,0 +1,16 @@
|
||||
|
||||
-- simple replacements demo
|
||||
|
||||
function span_text(str, class)
|
||||
return string.format("<span class='%s'>%s</span>", class, str)
|
||||
end
|
||||
|
||||
function wobble_text(str)
|
||||
return span_text("wobble", str)
|
||||
end
|
||||
|
||||
-- generate extra markup
|
||||
function memeposting(prefix, body)
|
||||
body = string.gsub(body, "<(%w+)>", wobble_text)
|
||||
return body
|
||||
end
|
||||
Reference in new issue
Block a user