Ver Fonte

org-exp.el: Fix export of subtree with HTML_CONTAINER_CLASS

* org-exp.el (org-export-remember-html-container-classes):
Allow exporting a single subtree with HTML_CONTAINER_CLASS
property.

TINYCHANGE
T.F. Torrey há 12 anos atrás
pai
commit
c7b3c56efd
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      lisp/org-exp.el

+ 4 - 2
lisp/org-exp.el

@@ -1476,8 +1476,10 @@ the current file."
 	    "^[ \t]*:HTML_CONTAINER_CLASS:[ \t]+\\(.+\\)$" nil t)
       (setq class (match-string 1))
       (save-excursion
-	(org-back-to-heading t)
-	(put-text-property (point-at-bol) (point-at-eol) 'html-container-class class)))))
+	(when (re-search-backward "^\\*" (point-min) t)
+	  (org-back-to-heading t)
+	  (put-text-property (point-at-bol) (point-at-eol)
+			     'html-container-class class))))))
 
 (defvar org-export-format-drawer-function nil
   "Function to be called to format the contents of a drawer.