Commit 72af2c05 authored by Antoine Martin's avatar Antoine Martin
Browse files

Handle error by calling more other md processor

parent 97b901e0
......@@ -84,7 +84,12 @@
(defun format-readme (readme)
(let ((readme-txt (file-to-string readme)))
(if (string= (pathname-type readme) "md")
(cmark-markdown-to-html readme-txt (length readme-txt) 0)
;; Format markdown files to proper HTML
(handler-case
(cmark-markdown-to-html readme-txt (length readme-txt) 0)
(error ()
(with-output-to-string (out)
(parse-string-and-print-to-stream readme-txt out))))
(format nil "<pre style=\"white-space: pre-wrap;\">~%~A~%</pre>"
readme-txt))))
......
(asdf:defsystem quickref
:author "Antoine Martin"
:depends-on (:quicklisp :alexandria :net.didierverna.declt
:cl-ppcre :clmark)
:cl-ppcre :clmark :3bmd)
:serial t
:components ((:file "quickref")
(:file "qrmapper")
......
......@@ -17,6 +17,8 @@
:regex-replace)
(:import-from :clmark
:cmark-markdown-to-html)
(:import-from :3bmd
:parse-string-and-print-to-stream)
(:export :print-primary-systems
:get-primary-system-name
:from-quickref-dir
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment