emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH] Fix TODO export in html TOC


From: Austin Walker
Subject: [O] [PATCH] Fix TODO export in html TOC
Date: Wed, 17 Feb 2016 23:22:00 -0500

Hello all,

I'd like to submit a fix for an issue seen by reddit user simonced.
https://www.reddit.com/r/emacs/comments/46717x/orgmode_todo_html_export_in_toc/

When exporting a TODO headline to html, the TOC will show the class to be "todo nilTODO". The fix is to replace nil with an empty string. I'm new to the org-mode mailing list, so please let me know if I made a mistake. Thanks!

From e456d1722f983baa11a38e944be279f4d21f588b Mon Sep 17 00:00:00 2001
From: Austin Walker <address@hidden>
Date: Wed, 17 Feb 2016 22:43:00 -0500
Subject: [PATCH] ox-html.el: Fix TOC export of TODO headlines

* lisp/ox-html.el (org-html--todo): Don't show nil in format string for
  TODO class

Use empty string if :html-todo-kwd-class-prefix is not present.

TINYCHANGE
---
 lisp/ox-html.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 697e5aa..2d7acec 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1989,7 +1989,7 @@ INFO is a plist used as a communication channel."
   (when todo
     (format "<span class=\"%s %s%s\">%s</span>"
         (if (member todo org-done-keywords) "done" "todo")
-        (plist-get info :html-todo-kwd-class-prefix)
+        (or (plist-get info :html-todo-kwd-class-prefix) "")
         (org-html-fix-class-name todo)
         todo)))
 
--
2.7.1

- Austin Walker

reply via email to

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