Commit 98957d95 authored by Antoine Martin's avatar Antoine Martin
Browse files

Format markdown READMEs before adding them to html

parent ffb8d1df
......@@ -81,6 +81,14 @@
:if-exists :supersede)
(defun format-readme (readme)
(let ((readme-txt (file-to-string readme)))
(if (string= (pathname-type readme) "md")
(with-output-to-string (out)
(parse-string-and-print-to-stream readme-txt out))
(format nil "<pre style=\"white-space: pre-wrap;\">~%~A~%</pre>"
(defun use-readme-intro (html-pathname readme-pathname)
(read-write-file (html-pathname html-text stream)
......@@ -88,6 +96,5 @@
"\\<h2 class=\\\"chapter\\\"\\>1 Introduction\\<\\/h2\\>\\n"
(list :match
(format nil "<pre style=\"white-space: pre-wrap;\">~%~A~%</pre>"
(file-to-string readme-pathname))))
(format-readme readme-pathname)))
(asdf:defsystem quickref
:author "Antoine Martin"
:depends-on (:quicklisp :alexandria :net.didierverna.declt :cl-ppcre)
:depends-on (:quicklisp :alexandria :net.didierverna.declt
:cl-ppcre :3bmd)
:serial t
:components ((:file "quickref")
(:file "qrmapper")
......@@ -7,6 +7,8 @@
(:import-from :cl-ppcre
(:import-from :3bmd
(:export :print-primary-systems
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