                                                                                                      (:issuer_name e) "\n"
                                                                                                      [:anchor {:target (:issuer_url e) :style{:family :times-roman :color [66 100 162]}} (or (:issuer_url e) "-")] "\n"
                                                                                                      [:chunk (if (number? (:issued_on e)) (date-from-unix-time (long (* 1000 (:issued_on e)))) (:issued_on e))] "\n"
-                                                                                                     (process-markdown "Endorsements" (:content e))]))])
+                                                                                                     (process-markdown (:content e))]))])
 
                                                                [:line {:dotted true}]
                                                                [:spacer 0]

                                                                             (:issuer_name e) "\n"
                                                                             [:anchor {:target (:issuer_url e) :style{:family :times-roman :color [66 100 162]}} (:issuer_url e)] "\n"
                                                                             [:chunk.link (if (number? (:issued_on e)) (date-from-unix-time (long (* 1000 (:issued_on e)))) (:issued_on e))] "\n"
                                                                             (process-markdown "Issuer endorsements" (:content e))]))]))

                                                               [:pdf-table {:align :right :width-percent 100 :cell-border false}
                                                                nil

    (replace-nils badges)))

(defn process-pdf-page [stylesheet template badge]
  (if-let [p (blank? (slurp (io/piped-input-stream (fn [out] (pdf/pdf (into [stylesheet] (template badge)) out)))))]
    (io/piped-input-stream (fn [out] (pdf/pdf [{} [:paragraph "Error while processing, Page can't be displayed"]] out)))
    (io/piped-input-stream (fn [out] (pdf/pdf (into [stylesheet] (template badge)) out)))))

(defn process-markdown [markdown]
  (if (== 1 (count markdown))
    markdown
      (if-let [p (blank? (slurp (io/piped-input-stream (fn [out] (pdf/pdf [{} (markdown->clj-pdf {:spacer {:extra-starting-value 1 :allow-extra-line-breaks? true :single-value 2} :wrap {:global-wrapper :paragraph}} markdown)] out)))))]
