parsers.lua

Tue, 14 Jul 2009 02:07:18 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 14 Jul 2009 02:07:18 +0100
changeset 13
39add8e7fa99
parent 12
4c759312950b
permissions
-rwxr-xr-x

Add initial jorvick utility to manage posts and build the site

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
12
4c759312950b Update to modularise a little, and prepare for a system-wide installation support
Matthew Wild <mwild1@gmail.com>
parents: 0
diff changeset
8 local markdown = require "jorvick.parsers.markdown"
0
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
12
4c759312950b Update to modularise a little, and prepare for a system-wide installation support
Matthew Wild <mwild1@gmail.com>
parents: 0
diff changeset
14 local textile = require "jorvick.parsers.textile"
0
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