dependency from cheshire eliminated
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
[hiccup "1.0.0"]
|
[hiccup "1.0.0"]
|
||||||
[ring/ring-core "1.1.0"]
|
[ring/ring-core "1.1.0"]
|
||||||
[cssgen "0.2.6"]
|
[cssgen "0.2.6"]
|
||||||
[cheshire "4.0.0"]
|
|
||||||
[clj-redis "0.0.12"]
|
[clj-redis "0.0.12"]
|
||||||
[org.pegdown/pegdown "1.1.0"]
|
[org.pegdown/pegdown "1.1.0"]
|
||||||
[noir "1.3.0-beta1"]]
|
[noir "1.3.0-beta1"]]
|
||||||
|
|||||||
@@ -185,5 +185,5 @@
|
|||||||
:border-bottom [:1px :dashed foreground-halftone]
|
:border-bottom [:1px :dashed foreground-halftone]
|
||||||
:margin-top :3em
|
:margin-top :3em
|
||||||
:margin-bottom :3em)
|
:margin-bottom :3em)
|
||||||
(rule "h1, h2, h3, h4"
|
(rule "h1, h2, h3, h4, h5, h6"
|
||||||
:font-family header-fonts))))
|
:font-family header-fonts))))
|
||||||
|
|||||||
@@ -6,14 +6,13 @@
|
|||||||
[NoteHub.settings]
|
[NoteHub.settings]
|
||||||
[NoteHub.views.common]
|
[NoteHub.views.common]
|
||||||
[clojure.string :rename {replace sreplace}
|
[clojure.string :rename {replace sreplace}
|
||||||
:only [split replace blank? split-lines lower-case]]
|
:only [escape split replace blank? split-lines lower-case]]
|
||||||
[clojure.core.incubator :only [-?>]]
|
[clojure.core.incubator :only [-?>]]
|
||||||
[hiccup.form]
|
[hiccup.form]
|
||||||
[hiccup.core]
|
[hiccup.core]
|
||||||
[hiccup.element]
|
[hiccup.element]
|
||||||
[noir.response :only [redirect status content-type]]
|
[noir.response :only [redirect status content-type]]
|
||||||
[noir.core :only [defpage defpartial]]
|
[noir.core :only [defpage defpartial]]
|
||||||
[cheshire.core]
|
|
||||||
[noir.statuses])
|
[noir.statuses])
|
||||||
(:import
|
(:import
|
||||||
[java.util Calendar]
|
[java.util Calendar]
|
||||||
@@ -67,8 +66,7 @@
|
|||||||
; This function answers to an AJAX request: it gets a session key and a markdown text.
|
; This function answers to an AJAX request: it gets a session key and a markdown text.
|
||||||
; It returns the html code of the provided markdown and a new session key.
|
; It returns the html code of the provided markdown and a new session key.
|
||||||
(defpage [:post "/preview"] {:keys [session-key draft]}
|
(defpage [:post "/preview"] {:keys [session-key draft]}
|
||||||
(generate-string
|
(str "{ preview: " (escape (md-to-html draft) {\" "\\\""}) "}"))
|
||||||
{:preview (md-to-html draft)}))
|
|
||||||
|
|
||||||
; Landing Page
|
; Landing Page
|
||||||
(defpage "/" {}
|
(defpage "/" {}
|
||||||
|
|||||||
Reference in New Issue
Block a user