Browse Source

Improve XHTML validation.

Carsten Dominik 16 years ago
parent
commit
8c1e5c2d17
5 changed files with 22 additions and 7 deletions
  1. 2 2
      doc/org.texi
  2. 11 0
      lisp/ChangeLog
  3. 5 1
      lisp/org-exp.el
  4. 3 3
      lisp/org-publish.el
  5. 1 1
      lisp/org.el

+ 2 - 2
doc/org.texi

@@ -8226,7 +8226,7 @@ directory on the local machine.
          :publishing-directory "~/public_html"
          :section-numbers nil
          :table-of-contents nil
-         :style "<link rel=stylesheet
+         :style "<link rel="stylesheet"
                 href=\"../other/mystyle.css\"
                 type=\"text/css\">")))
 @end lisp
@@ -8263,7 +8263,7 @@ right place on the web server, and publishing images to it.
           :headline-levels 3
           :section-numbers nil
           :table-of-contents nil
-          :style "<link rel=stylesheet
+          :style "<link rel="stylesheet"
                   href=\"../other/mystyle.css\" type=\"text/css\">"
           :auto-preamble t
           :auto-postamble nil)

+ 11 - 0
lisp/ChangeLog

@@ -1,3 +1,14 @@
+2008-11-02  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org-publish.el (org-publish-org-index): Create a section in the
+	index file.
+
+	* org.el (org-emphasis-alist): Use span instead of <u> to
+	underline text.
+
+	* org-exp.el (org-export-as-html): Make sure <p> is closed before
+	<pre> sections.
+
 2008-11-01  Sebastian Rose  <sebastian_rose@gmx.de>
 
 	* org-jsinfo.el (org-infojs-template): Remove language attribute

+ 5 - 1
lisp/org-exp.el

@@ -3098,6 +3098,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)
@@ -3335,6 +3336,7 @@ lang=\"%s\" xml:lang=\"%s\">
 				  head-count)
 	    ;; QUOTES
 	    (when (string-match quote-re line)
+	      (org-close-par-maybe)
 	      (insert "<pre>")
 	      (setq inquote t)))
 
@@ -3445,7 +3447,9 @@ 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

+ 3 - 3
lisp/org-publish.el

@@ -75,7 +75,7 @@
 ;;                   :with-section-numbers nil
 ;; 		     :table-of-contents nil
 ;;                   :recursive t
-;; 		     :style "<link rel=stylesheet href=\"../other/mystyle.css\" type=\"text/css\">")))
+;; 		     :style "<link rel="stylesheet" href=\"../other/mystyle.css\" type=\"text/css\">")))
 
 ;;;; More complex example configuration:
 
@@ -103,7 +103,7 @@
 ;; 		       :headline-levels 3
 ;;                     :with-section-numbers nil
 ;; 		       :table-of-contents nil
-;; 		       :style "<link rel=stylesheet href=\"../other/mystyle.css\" type=\"text/css\">"
+;; 		       :style "<link rel="stylesheet" href=\"../other/mystyle.css\" type=\"text/css\">"
 ;; 		       :auto-preamble t
 ;; 		       :auto-postamble nil)
 ;;         ("images" :base-directory "~/images/"
@@ -626,7 +626,7 @@ Default for INDEX-FILENAME is 'index.org'."
     (if index-buffer
 	(kill-buffer index-buffer))
     (with-temp-buffer
-      (insert (concat index-title "\n\n"))
+      (insert (concat "* " index-title "\n\n"))
       (while (setq file (pop files))
 	(let ((fn (file-name-nondirectory file))
 	      (link (file-relative-name file dir))

+ 1 - 1
lisp/org.el

@@ -2264,7 +2264,7 @@ Use customize to modify this, or restart Emacs after changing it."
 (defcustom org-emphasis-alist
   `(("*" bold "<b>" "</b>")
     ("/" italic "<i>" "</i>")
-    ("_" underline "<u>" "</u>")
+    ("_" underline "<span style=\"text-decoration:underline;\">" "</span>")
     ("=" org-code "<code>" "</code>" verbatim)
     ("~" org-verbatim "<code>" "</code>" verbatim)
     ("+" ,(if (featurep 'xemacs) 'org-table '(:strike-through t))