--- lisp/org-html.el 2010-04-21 17:02:18.000000000 +0200 +++ lisp/org-html-versuch-mit-rawhtml.el 2010-04-21 17:50:10.000000000 +0200 @@ -929,6 +929,12 @@ ;; Protected HTML (when (get-text-property 0 'org-protected line) + (when in-local-list + (org-export-html-close-lists-maybe line t) + (insert line "\n") + (throw 'nextline nil)) + + (let (par (ind (get-text-property 0 'original-indentation line))) (when (re-search-backward "\\(

\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t) @@ -959,10 +965,12 @@ (when (equal "ORG-VERSE-START" line) (org-close-par-maybe) (insert "\n

\n") + (setq org-par-open t) (setq inverse t) (throw 'nextline nil)) (when (equal "ORG-VERSE-END" line) (insert "

\n") + (setq org-par-open nil) (org-open-par) (setq inverse nil) (throw 'nextline nil)) @@ -986,6 +994,8 @@ (unless (string-match "\\\\\\\\[ \t]*$" line) (setq line (concat line "\\\\"))))) + (org-open-par-maybe) + ;; make targets to anchors (setq start 0) (while (string-match @@ -1982,6 +1992,11 @@ (org-close-par-maybe) (insert "\n

") (setq org-par-open t)) +(defun org-open-par-maybe () + "Insert

, but only if no paragraph is open." + (when (not org-par-open) + (insert "\n

") + (setq org-par-open t))) (defun org-close-par-maybe () "Close paragraph if there is one open." (when org-par-open @@ -1995,15 +2010,20 @@ (defvar in-local-list) (defvar local-list-indent) (defvar local-list-type) -(defun org-export-html-close-lists-maybe (line) - (let ((ind (or (get-text-property 0 'original-indentation line))) +(defun org-export-html-close-lists-maybe (line &optional rawhtml) + "RAWHTML suppresses paragraphs and checks the indentation for +`#+SPECIAL:' lines." + (let ((ind + (if rawhtml + (org-get-indentation line) + (or (get-text-property 0 'original-indentation line)))) ; (and (string-match "\\S-" line) ; (org-get-indentation line)))) didclose) (when ind (while (and in-local-list (<= ind (car local-list-indent))) - (setq didclose t) + (setq didclose (not rawhtml)) (org-close-li (car local-list-type)) (insert (format "\n" (car local-list-type))) (pop local-list-type) (pop local-list-indent)