summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-07-13 15:11:35 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:45 +0200
commit27cfeefc3bb0357ef29b23a75c4c8b41d64dafd3 (patch)
tree8a166205f4d03fc69d1076eb27f909713f2b7a08
parent07eb3308c1aa32d3a7ce69e84f33eb953a99542e (diff)
downloadorg-mode-27cfeefc3bb0357ef29b23a75c4c8b41d64dafd3.tar.gz
Code cleanup.
* org-html.el (org-export-as-html): Code cleanup.
-rw-r--r--lisp/org-html.el55
1 files changed, 11 insertions, 44 deletions
diff --git a/lisp/org-html.el b/lisp/org-html.el
index 382b09f..da0af3e 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1181,7 +1181,16 @@ lang=\"%s\" xml:lang=\"%s\">
(org-open-par))
(throw 'nextline nil))
- ;; (org-export-html-close-lists-maybe line)
+ ;; Explicit list closure
+ (when (equal "ORG-LIST-END" line)
+ (while local-list-indent
+ (org-close-li (car local-list-type))
+ (insert (format "</%sl>\n" (car local-list-type)))
+ (pop local-list-type)
+ (pop local-list-indent))
+ (setq in-local-list nil)
+ (org-open-par)
+ (throw 'nextline nil))
;; Protected HTML
(when (get-text-property 0 'org-protected line)
@@ -1505,17 +1514,6 @@ lang=\"%s\" xml:lang=\"%s\">
(insert "<pre>")
(setq inquote t)))
- ;; Explicit list closure
- ((equal "ORG-LIST-END" line)
- (while local-list-indent
- (org-close-li (car local-list-type))
- (insert (format "</%sl>\n" (car local-list-type)))
- (pop local-list-type)
- (pop local-list-indent))
- (setq in-local-list nil)
- (org-open-par)
- (throw 'nextline nil))
-
((and org-export-with-tables
(string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)" line))
(when (not table-open)
@@ -1657,14 +1655,7 @@ lang=\"%s\" xml:lang=\"%s\">
(when inquote
(insert "</pre>\n")
(org-open-par))
- ;; (when in-local-list
- ;; ;; Close any local lists before inserting a new header line
- ;; (while local-list-type
- ;; (org-close-li (car local-list-type))
- ;; (insert (format "</%sl>\n" (car local-list-type)))
- ;; (pop local-list-type))
- ;; (setq local-list-indent nil
- ;; in-local-list nil))
+
(org-html-level-start 1 nil umax
(and org-export-with-toc (<= level umax))
head-count)
@@ -1745,8 +1736,6 @@ lang=\"%s\" xml:lang=\"%s\">
(while (re-search-forward "<li>[ \r\n\t]*</li>\n?" nil t)
(replace-match ""))
(goto-char (point-min))
- ;; (while (re-search-forward "</ul>\\s-*<ul>\n?" nil t)
- ;; (replace-match ""))
;; Convert whitespace place holders
(goto-char (point-min))
(let (beg end n)
@@ -2267,28 +2256,6 @@ If there are links in the string, don't modify these."
(defvar in-local-list)
(defvar local-list-indent)
(defvar local-list-type)
-;; (defun org-export-html-close-lists-maybe (line)
-;; "Close local lists based on the original indentation of the line."
-;; (let* ((rawhtml (and in-local-list
-;; (get-text-property 0 'org-protected line)
-;; (not (get-text-property 0 'org-example line))))
-;; ;; rawhtml means: This was between #+begin_html..#+end_html
-;; ;; originally, thus it excludes stuff that was a source code example
-;; ;; Actually, this code seems wrong, I don't know why it works, but
-;; ;; it seems to work.... So keep it like this for now.
-;; (ind (if rawhtml
-;; (org-get-indentation line)
-;; (get-text-property 0 'original-indentation line)))
-;; didclose)
-;; (when ind
-;; (while (and in-local-list
-;; (<= ind (car local-list-indent)))
-;; (setq didclose t)
-;; (org-close-li (car local-list-type))
-;; (insert (format "</%sl>\n" (car local-list-type)))
-;; (pop local-list-type) (pop local-list-indent)
-;; (setq in-local-list local-list-indent))
-;; (and didclose (org-open-par)))))
(defvar body-only) ; dynamically scoped into this.
(defun org-html-level-start (level title umax with-toc head-count)