summaryrefslogtreecommitdiff
path: root/common.php
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2019-02-06 13:50:16 +0000
committerIan C <ianc@noddybox.co.uk>2019-02-06 13:50:16 +0000
commit3a013ad02eb263a751ec1310837065fac581b81e (patch)
treef88c5867232c6118d6a3f0f20dc4c8d45f6e245e /common.php
parent3825efd8ca52f6c8c5471168b016fb4d10f482b7 (diff)
Automatically convert markdown to HTML.
Diffstat (limited to 'common.php')
-rw-r--r--common.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/common.php b/common.php
index 9bd8272..1e10349 100644
--- a/common.php
+++ b/common.php
@@ -30,6 +30,17 @@ function EndsWith($line, $c)
return substr($line, -1) == $c;
}
+function IsMarkdown($fname)
+{
+ switch(pathinfo($fname, PATHINFO_EXTENSION))
+ {
+ case 'md':
+ return True;
+ }
+
+ return False;
+}
+
function GuessMimeType($fname)
{
switch(pathinfo($fname, PATHINFO_EXTENSION))