summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-09 00:10:54 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-09 00:10:54 +0200
commitf1528c036b79ca90df67d2e84bb7c2c1d048c482 (patch)
tree7db07846cfb8d93098c84f7364f3ab64407e8a3d
parentc154406f2afc17217b5f459a8f245aa5e5e06aad (diff)
Fix the display of entries of type “html”.
Ignore-this: 4ff8f3464673f1f27ac9d444b9e7f975 darcs-hash:0eaa27bd94d09a8e489c800088767318bc0ff273
-rwxr-xr-xjournal.lisp17
1 files changed, 11 insertions, 6 deletions
diff --git a/journal.lisp b/journal.lisp
index b0d3ec5..b8ec11d 100755
--- a/journal.lisp
+++ b/journal.lisp
@@ -167,7 +167,9 @@
("xml:lang" "de")
("xml:base" ,(link-to :index :absolute t))))
(with-tag ("div" '(("xmlns" "http://www.w3.org/1999/xhtml")))
- (xml-as-is (journal-markup->html (body-of journal-entry)))))))))
+ (xml-as-is (if (equal (entry-type-of journal-entry) "html")
+ (body-of journal-entry)
+ (journal-markup->html (body-of journal-entry))))))))))
#.(restore-sql-reader-syntax-state))
@@ -250,8 +252,8 @@
(defun show-journal-entry (journal-entry &key (comments-p nil))
- (with-slots (id title body categories date) journal-entry
- (show-journal-entry-with-components id title body categories date
+ (with-slots (id title body categories date type) journal-entry
+ (show-journal-entry-with-components id title body categories date type
(comments-about journal-entry
:ordered-p t
:ham-p t)
@@ -261,8 +263,8 @@
:ham-p t))))
-(defun show-journal-entry-with-components (id title body categories
- posting-date comments comments-p trackbacks)
+(defun show-journal-entry-with-components (id title body categories posting-date
+ type comments comments-p trackbacks)
(unless *full-entry-view*
(<:tr
(<:td (<:a :href (link-to :view :post-id id)
@@ -287,7 +289,9 @@
(<:as-html
(format nil "Abgeheftet unter ...")))))
(<:div :class :journal-entry-body
- (<:as-is (journal-markup->html body)))
+ (<:as-is (if (equal type "html")
+ body
+ (journal-markup->html body))))
(<:div :class :journal-entry-footer
(<:form :class :journal-entry-delete-button-form
:style "display: inline;"
@@ -621,6 +625,7 @@
body
nil
(get-universal-time)
+ "markdown"
nil
nil
nil)