parsers.lua

Sat, 11 Jul 2009 03:37:48 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 11 Jul 2009 03:37:48 +0100
changeset 10
58f3707e44d7
parent 0
b40ca010c49c
child 12
4c759312950b
permissions
-rwxr-xr-x

Strip trailing punctuation from short titles

0
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 parsers = {};
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 function parsers.text(text)
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 --FIXME: HTML-escape
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 return text;
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 end
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 local markdown = require "LuaTemplates.markdown"
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 function parsers.markdown(text)
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10 return markdown(text);
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11 end
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14 local textile = require "LuaTemplates.textile"
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
15 function parsers.textile(text)
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
16 return textile(text);
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
17 end
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
18
b40ca010c49c Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
19 return parsers;

mercurial