Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make output from restructured text generator useable #43

merged 1 commit into from Mar 7, 2014
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -4,14 +4,20 @@
(defpackage :coleslaw-rst
(:use :cl)
(:import-from :coleslaw #:render-content)
(:import-from :docutils #:read-rst
(:import-from :docutils #:read-rst #:write-part #:register-settings-spec
#:visit-node #:write-document)
(:import-from :docutils.writer.html #:html-writer #:write-part)
(:export #:enable))

(in-package :coleslaw-rst)

(defmethod render-content (text (format (eql :rst)))
(register-settings-spec '((:generator nil)
(:datestamp nil)))
(with-output-to-string (str)
(write-html str (read-rst text))))
(let ((writer (make-instance 'html-writer))
(document (read-rst text)))
(visit-node writer document)
(write-document writer document str))))

(defun enable ())
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.