HTML export: Fix bug with horizontal rules in plain lists.

Brenton Kenkel writes:

> I'm using org-mode 6.28e on Aquamacs (based on GNU Emacs
> 22.3.1) on Mac OS X. I'm having an issue with horizontal
> rules and lists in HTML export. When I export the following
> to HTML, the horizontal rule tag is generated within the
> unordered list, rather than after it ends:
>
> ,-----
> | * test
> |
> | - this is a list
> |
> |
> | -----
> |
> | * next section
> |
> | No list.
> |
> |
> | -----
> |
> `-----
>
> I want the first horizontal rule to be even with the second;
> namely, extending all the way to the left. Any way to do
> this?
This commit is contained in:
Carsten Dominik 2009-07-27 07:06:00 +02:00
parent d56f2f4fa5
commit 3788dc336f
2 changed files with 12 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2009-07-27 Carsten Dominik <carsten.dominik@gmail.com>
* org-html.el (org-export-as-html): Move hrule detection to after
plain list handling.
2009-07-26 Carsten Dominik <carsten.dominik@gmail.com>
* org-html.el (org-format-org-table-html): Fix colgroup tags.

View file

@ -920,13 +920,6 @@ lang=\"%s\" xml:lang=\"%s\">
(and par (insert "<p>\n")))
(throw 'nextline nil))
;; Horizontal line
(when (string-match "^[ \t]*-\\{5,\\}[ \t]*$" line)
(if org-par-open
(insert "\n</p>\n<hr/>\n<p>\n")
(insert "\n<hr/>\n"))
(throw 'nextline nil))
;; Blockquotes, verse, and center
(when (equal "ORG-BLOCKQUOTE-START" line)
(org-close-par-maybe)
@ -1306,6 +1299,13 @@ lang=\"%s\" xml:lang=\"%s\">
"<b>[<span style=\"visibility:hidden;\">X</span>]</b>")
t t line))))
;; Horizontal line
(when (string-match "^[ \t]*-\\{5,\\}[ \t]*$" line)
(if org-par-open
(insert "\n</p>\n<hr/>\n<p>\n")
(insert "\n<hr/>\n"))
(throw 'nextline nil))
;; Empty lines start a new paragraph. If hand-formatted lists
;; are not fully interpreted, lines starting with "-", "+", "*"
;; also start a new paragraph.