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 @@
[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"]]

2
src/NoteHub/views/css.clj

@ -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
src/NoteHub/views/pages.clj

@ -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 "/" {}

Loading…
Cancel
Save