Add handling of blockquote and output formats that must be flowed.

Added a handler for blockquotes.

Also added :body-newline-paragraph to the org-set-generic-type.  This is
intended to help handling output formats (like tikiwiki) where newlines are
treated as paragraph separators, instead of being used to fill (i.e., the
destination is expected to do the word-wrapping).  If this is set to T then
org-export-generic will emit a newline character when it sees a blank
line.  This should be used in concert with a value like "%s " for
:body-line-format and nil for :body-line-wrap.
This commit is contained in:
Robert P. Goldman 2010-04-28 16:39:59 -05:00 committed by Carsten Dominik
parent ef51006a8f
commit 413e6b4eee
1 changed files with 17 additions and 2 deletions

View File

@ -88,8 +88,9 @@
;; * properties
;; * drawers
;; * oh my
;; * optmization (many plist extracts should be in (let) vars
;; * optmization (many plist extracts should be in let vars)
;; * define defcustom spec for the specifier list
;; * fonts: at least monospace is not handled at all here.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
@ -638,10 +639,14 @@ underlined headlines. The default is 3."
(or (plist-get export-plist :body-list-checkbox-done-end) ""))
(listcheckhalfend
(or (plist-get export-plist :body-list-checkbox-half-end) ""))
(bodynewline-paragraph (plist-get export-plist :body-newline-paragraph))
(bodytextpre (plist-get export-plist :body-text-prefix))
(bodytextsuf (plist-get export-plist :body-text-suffix))
(bodylinewrap (plist-get export-plist :body-line-wrap))
(bodylineform (or (plist-get export-plist :body-line-format) "%s"))
(blockquotestart (or (plist-get export-plist :blockquote-start) "\n\n\t"))
(blockquoteend (or (plist-get export-plist :blockquote-end) "\n\n"))
thetoc toctags have-headings first-heading-pos
table-open table-buffer link-buffer link desc desc0 rpl wrap)
@ -868,7 +873,7 @@ underlined headlines. The default is 3."
((string-match "^\\([ \t]*\\)\\(:\\( \\|$\\)\\)" line)
;;
;; pre-formated text
;; pre-formatted text
;;
(setq line (replace-match "\\1" nil nil line))
@ -933,6 +938,15 @@ underlined headlines. The default is 3."
)
(insert (format numlistformat line)))
((equal line "ORG-BLOCKQUOTE-START")
(setq line blockquotestart))
((equal line "ORG-BLOCKQUOTE-END")
(setq line blockquoteend))
((string-match "^\\s-*$" line)
;; blank line
(if bodynewline-paragraph
(insert "\n")))
(t
;;
;; body
@ -1009,6 +1023,7 @@ underlined headlines. The default is 3."
(goto-char beg)))
(goto-char (point-min))))
(defun org-export-generic-format (export-plist prop &optional len n reverse)
"converts a property specification to a string given types of properties