@@ 4,9 4,9 @@
# http://woffs.de/WCM
# <wcm@woffs.de>
#
-# Version 20131111
+# Version 20140613
#
-# Copyright © 2010-2013 WofFS
+# Copyright © 2010-2014 WofFS
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ 24,7 24,8 @@
use strict;
use utf8;
-eval "use Text::Markdown";
+eval "use Text::Markdown::Discount 'markdown'";
+eval "use Text::Markdown 'markdown'" if $@;
### config here ###
@@ 103,13 104,10 @@ sub walktree ($$$) {
#
unless ($file=~/\.(?:html|php)$/) {
eval {
- $content=Text::Markdown::Markdown($content)
+ $content=markdown($content)
};
- eval {
- $content=Text::Markdown::markdown($content)
- } if $@;
- $content="<b>ERROR</b>: <a href=\"http://daringfireball.net/projects/markdown/\">Text::Markdown</a> perl module not found".
- "<br/>Please install. Showing plain page:<br/><pre>$content</pre>\n" if $@;
+ $content="<b>ERROR</b>: <a href=\"http://daringfireball.net/projects/markdown/\">Markdown</a> perl module not found".
+ "<br/>Please install Text::Markdown::Discount or Text::Markdown. Showing plain page:<br/><pre>$content</pre>\n" if $@;
}
$hit=1;
} elsif (-l "$dir/$file") {