bin/populate-lang-table, mason/pastebin/%show: Add Markdown support.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 10 Apr 2017 16:29:09 +0000 (17:29 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 7 Jul 2017 20:35:37 +0000 (21:35 +0100)
Set paranoid options and away we go.

bin/populate-lang-table
mason/pastebin/%show

index 407a940..e96d6a2 100755 (executable)
@@ -14,6 +14,7 @@ while (<$fh>) {
 }
 close $fh or die "close highlight: $! $?";
 $newlang{"txt"} = "Plain text";
+$newlang{"md"} = "Markdown";
 
 Odin::xact {
   my $h = $db->selectall_hashref
index cfa0f26..a0e7f67 100644 (file)
@@ -28,6 +28,9 @@
 % filter "highlight", $m, $content,
 %   "highlight", "-Ohtml", "-f", "-t8", "-S$1";
 </pre>
+% } elsif ($lang eq "md") {
+% filter "markdown", $m, $content,
+%   "markdown", "-fnohtml,autolink,safelink,footnote";
 % } else {
 <div class="note">
 <p>I don't know how to display content with language