chiark / gitweb /
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 407a940c0b40afa8a64516b01f6bd07e1f816c6e..e96d6a2bf29cf31800514051ca349bd6ce5f44f0 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 cfa0f263b1bf952787f5355855e3c5fa7faed762..a0e7f672178779dd89c22548b143ed6ecb3f801a 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