From 0837833c14e48b160c856735c8ea4bbf614688f6 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Wed, 22 Aug 2012 16:47:12 -0400 Subject: [PATCH] Move markdown into core since it's tiny and blows up trying to load split-sequence. --- coleslaw.asd | 3 ++- plugins/markdown.lisp | 12 ------------ src/posts.lisp | 5 +++++ 3 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 plugins/markdown.lisp diff --git a/coleslaw.asd b/coleslaw.asd index 011c0e9..7a7708a 100644 --- a/coleslaw.asd +++ b/coleslaw.asd @@ -5,7 +5,8 @@ :license "BSD" :author "Brit Butler " :pathname "src/" - :depends-on (:closure-template :iolib.os :alexandria :cl-fad :local-time) + :depends-on (:alexandria :closure-template :3bmd :3bmd-ext-code-blocks + :local-time :iolib.os :cl-fad) :serial t :components ((:file "packages") (:file "config") diff --git a/plugins/markdown.lisp b/plugins/markdown.lisp deleted file mode 100644 index f3bc8df..0000000 --- a/plugins/markdown.lisp +++ /dev/null @@ -1,12 +0,0 @@ -(eval-when (:compile-toplevel :load-toplevel) - (ql:quickload '(3bmd 3bmd-ext-code-blocks))) - -(defpackage :coleslaw-md - (:use :cl :coleslaw)) - -(in-package :coleslaw-md) - -(defmethod render-content (text (format (eql :md))) - (let ((3bmd-code-blocks:*code-blocks* t)) - (with-output-to-string (str) - (3bmd:parse-string-and-print-to-stream text str)))) diff --git a/src/posts.lisp b/src/posts.lisp index 63cd746..ba9c06a 100644 --- a/src/posts.lisp +++ b/src/posts.lisp @@ -42,6 +42,11 @@ (:method (text (format (eql :html))) text)) +(defmethod render-content (text (format (eql :md))) + (let ((3bmd-code-blocks:*code-blocks* t)) + (with-output-to-string (str) + (3bmd:parse-string-and-print-to-stream text str)))) + (defun read-post (in) "Make a POST instance based on the data from the stream IN." (flet ((check-header ()