Explorar o código

HTML export: Add CSS class for TODO keyword in inline tasks

Request by Karl Maihofer.
Carsten Dominik %!s(int64=15) %!d(string=hai) anos
pai
achega
436e4282b1
Modificáronse 2 ficheiros con 14 adicións e 1 borrados
  1. 3 0
      lisp/ChangeLog
  2. 11 1
      lisp/org-inlinetask.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2010-01-01  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-inlinetask.el (org-inlinetask-export-handler): Add CSS class
+	for TODO keyword in inline tasks.
+
 	* org.el (org-log-note-headings): New headings for removing
 	deadline or scheduling date.
 	(org-deadline, org-schedule): Arrange for logging when removing a

+ 11 - 1
lisp/org-inlinetask.el

@@ -149,7 +149,17 @@ Either remove headline and meta data, or do special formatting."
 	(when (string-match org-complex-heading-regexp headline)
 	  (setq headline (concat
 			  (if (match-end 2)
-			      (concat (match-string 2 headline) " ") "")
+			      (concat
+			       (org-add-props
+				   (format
+				    "@<span class=\"%s %s\"> %s@</span>"
+				    (if (member (match-string 2 headline)
+						org-done-keywords)
+					"done" "todo")
+				    (match-string 2 headline)
+				    (match-string 2 headline))
+				   nil 'org-protected t)
+			       " ") "")
 			  (match-string 4 headline)))
 	  (when content
 	    (if (not (string-match "\\S-" content))