emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Valid XHTML


From: Carsten Dominik
Subject: Re: [Orgmode] Valid XHTML
Date: Sun, 2 Nov 2008 07:40:41 +0100

Applied, thanks.

- Carsten

On Oct 27, 2008, at 1:55 AM, Sebastian Rose wrote:

Hi,



1.) ERR

  SSTOOOP!!!

 Sebastian Rose wrote:
<a href="x.php%3Fa%3Db%26c%3Dd">x.php?a=b&amp;c=d</a>
                 ^                        ^
urlencoded--------'              entities--'


 Sorry, that's bullsh... This is one of the errors, that goes away, if


 <a href="x.php?a=b&c=d">x.php?a=b&amp;c=d</a>
                                  ^
                        entities--'



2.) Fix for 'no <pre> in <p> (XHTML)':

 The appended patch fixes this. Don't know if it is correct, but I
 tested repeatedly with various files and it seems OK. No empty <p>
 elements remain.




Regards,

  Sebastian
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 4153554..8762843 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -3102,6 +3102,7 @@ lang=\"%s\" xml:lang=\"%s\">
                     (string-match "^[ \t]*:\\(.*\\)" line))
            (when (not infixed)
              (setq infixed t)
+          (org-close-par-maybe)
              (insert "<pre class=\"example\">\n"))
            (insert (org-html-protect (match-string 1 line)) "\n")
            (when (or (not lines)
@@ -3339,6 +3340,7 @@ lang=\"%s\" xml:lang=\"%s\">
                                  head-count)
            ;; QUOTES
            (when (string-match quote-re line)
+          (org-close-par-maybe)
              (insert "<pre>")
              (setq inquote t)))

@@ -3449,7 +3451,7 @@ lang=\"%s\" xml:lang=\"%s\">
            (insert line "\n")))))

      ;; Properly close all local lists and other lists
-      (when inquote (insert "</pre>\n"))
+      (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
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]