diff --git a/build.sh b/build.sh index 989b90c..7036155 100755 --- a/build.sh +++ b/build.sh @@ -27,9 +27,13 @@ _next="" unstable="no" neochan="no" buildredis="no" +lua="no" # check for build flags for arg in "$@" ; do case $arg in + "--enable-lua") + lua="yes" + ;; "--enable-redis") buildredis="yes" ;; @@ -62,6 +66,10 @@ if [ "$buildredis" == "yes" ] ; then tags="$tags -tags disable_redis" fi +if [ "$lua" == "yes" ] ; then + tags="$tags -tags lua" +fi + if [ "$rev" == "" ] ; then echo "revision not specified" exit 1 diff --git a/contrib/lua/memeposting.lua b/contrib/lua/memeposting.lua new file mode 100644 index 0000000..9b9b775 --- /dev/null +++ b/contrib/lua/memeposting.lua @@ -0,0 +1,16 @@ + +-- simple replacements demo + +function span_text(str, class) + return string.format("%s", 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