mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 22:07:49 +00:00
ox-html.el: Add exporting of priority
* list/ox-html.el (org-html--priority): New function. (org-html-format-headline-default-function): Call `org-html--priority'. (org-html-style-default): Add `.priority'. HTML export previously did not support exporting of priority simply by setting `org-export-with-priority' to `t'. TINYCHANGE
This commit is contained in:
parent
f9ba99bbc9
commit
7e6436e2c8
|
@ -276,6 +276,7 @@ for the JavaScript code in this tag.
|
|||
.title { text-align: center; }
|
||||
.todo { font-family: monospace; color: red; }
|
||||
.done { font-family: monospace; color: green; }
|
||||
.priority { font-family: monospace; color: orange; }
|
||||
.tag { background-color: #eee; font-family: monospace;
|
||||
padding: 2px; font-size: 80%; font-weight: normal; }
|
||||
.timestamp { color: #bebebe; }
|
||||
|
@ -1885,6 +1886,14 @@ INFO is a plist used as a communication channel."
|
|||
(org-html-fix-class-name todo)
|
||||
todo)))
|
||||
|
||||
;;;; Priority
|
||||
|
||||
(defun org-html--priority (priority info)
|
||||
"Format a priority into HTML.
|
||||
PRIORITY is the character code of the priority or nil. INFO is
|
||||
a plist containing export options."
|
||||
(and priority (format "<span class=\"priority\">[%c]</span>" priority)))
|
||||
|
||||
;;;; Tags
|
||||
|
||||
(defun org-html--tags (tags info)
|
||||
|
@ -2396,8 +2405,12 @@ holding contextual information."
|
|||
"Default format function for a headline.
|
||||
See `org-html-format-headline-function' for details."
|
||||
(let ((todo (org-html--todo todo info))
|
||||
(priority (org-html--priority priority info))
|
||||
(tags (org-html--tags tags info)))
|
||||
(concat todo (and todo " ") text (and tags "   ") tags)))
|
||||
(concat todo (and todo " ")
|
||||
priority (and priority " ")
|
||||
text
|
||||
(and tags "   ") tags)))
|
||||
|
||||
(defun org-html--container (headline info)
|
||||
(or (org-element-property :HTML_CONTAINER headline)
|
||||
|
|
Loading…
Reference in a new issue