Change where markdown is processed

This commit is contained in:
oakes
2014-03-31 20:43:49 -04:00
parent c66f75ed92
commit 9f926daec0
2 changed files with 6 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
[clojure.java.io :as io]
[clojure.string :as string]
[marginalia.core :as marg]
[markdown.core :as m]
[play-clj-doclet.html :as html])
(:import [com.sun.javadoc ClassDoc ConstructorDoc Doc ExecutableMemberDoc
FieldDoc MethodDoc Parameter RootDoc]))
@@ -72,7 +73,7 @@
(into {})))
(defn process-group
[{:keys [type raw] :as group} doc-map]
[{:keys [type raw docstring] :as group} doc-map]
(let [form (read-string raw)
n (second form)]
(when (and (contains? #{'defn 'defmacro} (first form))
@@ -82,7 +83,8 @@
:java (->> doc-map
(filter #(.startsWith (first %) (str n)))
(sort-by first)
vec)))))
vec)
:docstring (m/md-to-html-string docstring)))))
(defn merge-groups
[groups]

View File

@@ -1,7 +1,6 @@
(ns play-clj-doclet.html
(:require [clojure.string :as string]
[hiccup.core :refer :all]
[markdown.core :as m]))
[hiccup.core :refer :all]))
(defn param
[[type-name param-name]]
@@ -26,7 +25,7 @@
(for [group groups]
[:div
[:h2 {} (:name group)]
(m/md-to-html-string (:docstring group))
(:docstring group)
(for [[name items] (:java group)]
[:div
(when (not= (:name group) name)