diff options
author | Ian C <ianc@noddybox.co.uk> | 2019-02-06 13:50:16 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2019-02-06 13:50:16 +0000 |
commit | 3a013ad02eb263a751ec1310837065fac581b81e (patch) | |
tree | f88c5867232c6118d6a3f0f20dc4c8d45f6e245e /common.php | |
parent | 3825efd8ca52f6c8c5471168b016fb4d10f482b7 (diff) |
Automatically convert markdown to HTML.
Diffstat (limited to 'common.php')
-rw-r--r-- | common.php | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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)) |