Use defcustom

ご主人様
not manx 4 years ago
parent 00fe22de9d
commit 37800ce008
Signed by: C-xC-c
GPG Key ID: F52ED472284EF2F4

@ -3,8 +3,8 @@
;; Author: Plum <boku@plum.moe> ;; Author: Plum <boku@plum.moe>
;; Created: June 2020 ;; Created: June 2020
;; Package-Version: 1.1.0 ;; Package-Version: 1.2.0
;; Keywords: org-export ;; Keywords: files
;; URL: https://words.plum.moe/ox-plumhtml.html ;; URL: https://words.plum.moe/ox-plumhtml.html
;; Package-Requires: ((emacs "26.1") (ox-slimhtml "0.4.5")) ;; Package-Requires: ((emacs "26.1") (ox-slimhtml "0.4.5"))
@ -31,11 +31,15 @@
(require 'ox-slimhtml) (require 'ox-slimhtml)
;; Variables ;; Variables
(defvar ox-plumhtml-export-header-ids nil) (defcustom ox-plumhtml-export-header-ids nil
"When non-nill adds HTML ids to header tags
Enables linking to said headers from within the document"
:type '(boolean))
;; Utils ;; Utils
(defun ox-plumhtml--table-header-p (element info) (defun ox-plumhtml--table-header-p (element info)
"Return t if the table has a header else nil." "Return t if the table has a header."
(or (org-export-table-has-header-p element info) (or (org-export-table-has-header-p element info)
(org-export-table-has-header-p (org-export-get-parent-table element) info))) (org-export-table-has-header-p (org-export-get-parent-table element) info)))
@ -93,9 +97,7 @@ Uses <th> for table headers"
(defun ox-plumhtml-headline (headline contents info) (defun ox-plumhtml-headline (headline contents info)
(let* ((text (org-export-data (org-element-property :title headline) info)) (let* ((text (org-export-data (org-element-property :title headline) info))
(level (org-export-get-relative-level headline info)) (level (org-export-get-relative-level headline info))
(attributes (org-element-property :ATTR_HTML headline)) (attributes (org-element-property :ATTR_HTML headline)))
(container (org-element-property :HTML_CONTAINER headline))
(container-class (and container (org-element-property :HTML_CONTAINER_CLASS headline))))
(when attributes (when attributes
(setq attributes (setq attributes
(format " %s" (org-html--make-attribute-string (format " %s" (org-html--make-attribute-string

Loading…
Cancel
Save