summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-12-28 17:38:20 +0100
committerGravatar Tom Willemse2013-12-28 17:38:20 +0100
commitf3315a4ddbd3228c14ce2eee0174f039b19c9b09 (patch)
tree351c07c6af272119f368dbb6e8a31cfedcd6c1ab
parent6006120614c6f6a56a62f999c38a7c638e6b1c6d (diff)
downloadedocs-f3315a4ddbd3228c14ce2eee0174f039b19c9b09.tar.gz
edocs-f3315a4ddbd3228c14ce2eee0174f039b19c9b09.zip
Use org to export text
-rw-r--r--edocs.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/edocs.el b/edocs.el
index 46d7c8a..a775420 100644
--- a/edocs.el
+++ b/edocs.el
@@ -1,4 +1,4 @@
-;;; edocs.el --- Extract documentation from file(s)
+;;; edocs.el --- Extract and format documentation from file(s)
;; Copyright (C) 2013 Tom Willemse
@@ -25,12 +25,13 @@
;; simple HTML export of the Commentary and all the docstrings in a
;; file. It is meant to be used as a batch operation, like so:
-;; emacs -batch -l edocs.el -f edocs-generate-batch file.el
+;; : emacs -batch -l edocs.el -f edocs-generate-batch file.el
;;; Code:
(require 'help-fns)
(require 'lisp-mnt)
+(require 'ox-html)
(require 'package)
(defvar edocs-stylesheet-location "style.css"
@@ -128,7 +129,7 @@ etc."
(defun edocs--format-text (txt)
"Perform formatting operations on TXT."
- (replace-regexp-in-string "\n\n" "</p><p>" txt))
+ (org-export-string-as txt 'html t))
(defun edocs--format-commentary (cmt)
"Perform special commentary formatting operations on CMT."