Browse Source

dependency from cheshire eliminated

master
Christian Mueller 12 years ago
parent
commit
14f73d3bd5
  1. 1
      project.clj
  2. 2
      src/NoteHub/views/css.clj
  3. 6
      src/NoteHub/views/pages.clj

1
project.clj

@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
[hiccup "1.0.0"]
[ring/ring-core "1.1.0"]
[cssgen "0.2.6"]
[cheshire "4.0.0"]
[clj-redis "0.0.12"]
[org.pegdown/pegdown "1.1.0"]
[noir "1.3.0-beta1"]]

2
src/NoteHub/views/css.clj

@ -185,5 +185,5 @@ @@ -185,5 +185,5 @@
:border-bottom [:1px :dashed foreground-halftone]
:margin-top :3em
:margin-bottom :3em)
(rule "h1, h2, h3, h4"
(rule "h1, h2, h3, h4, h5, h6"
:font-family header-fonts))))

6
src/NoteHub/views/pages.clj

@ -6,14 +6,13 @@ @@ -6,14 +6,13 @@
[NoteHub.settings]
[NoteHub.views.common]
[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 [-?>]]
[hiccup.form]
[hiccup.core]
[hiccup.element]
[noir.response :only [redirect status content-type]]
[noir.core :only [defpage defpartial]]
[cheshire.core]
[noir.statuses])
(:import
[java.util Calendar]
@ -67,8 +66,7 @@ @@ -67,8 +66,7 @@
; 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.
(defpage [:post "/preview"] {:keys [session-key draft]}
(generate-string
{:preview (md-to-html draft)}))
(str "{ preview: " (escape (md-to-html draft) {\" "\\\""}) "}"))
; Landing Page
(defpage "/" {}

Loading…
Cancel
Save