diff options
author | Arun Isaac | 2020-03-13 23:52:34 +0530 |
---|---|---|
committer | Arun Isaac | 2020-03-13 23:52:34 +0530 |
commit | 28b1aa71052c0288381a66c845d90e6416bb2f9a (patch) | |
tree | 790c2b0b1eb7f0cb319ffa2197d6909a4710b3d1 | |
parent | 754e1d61e476145e69b32b3879daf78c2b83d554 (diff) | |
download | ennum-28b1aa71052c0288381a66c845d90e6416bb2f9a.tar.gz ennum-28b1aa71052c0288381a66c845d90e6416bb2f9a.tar.lz ennum-28b1aa71052c0288381a66c845d90e6416bb2f9a.zip |
List tags only if present.
* ennu-html.el (ennu-html-inner-template): List tags only if present.
-rw-r--r-- | ennu-html.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ennu-html.el b/ennu-html.el index 28a4a6b..bf7cb0f 100644 --- a/ennu-html.el +++ b/ennu-html.el @@ -246,14 +246,16 @@ translations ", "))) ;; Tags - (format "<p>Tags: %s</p>" - (mapconcat - (lambda (tag) - (replace-regexp-in-string - "<a " "<a class=\"p-category\" " - (ennu-export-tag (ennu-add-tongue-suffix tag (plist-get info :language)) - tag (org-export-backend-name (plist-get info :back-end))))) - tags ", ")) + (when-let (tags (plist-get info :filetags)) + (format "<p>Tags: %s</p>" + (mapconcat + (lambda (tag) + (replace-regexp-in-string + "<a " "<a class=\"p-category\" " + (ennu-export-tag (ennu-add-tongue-suffix tag (plist-get info :language)) + tag (org-export-backend-name (plist-get info :back-end))))) + tags + ", "))) ;; Summary (format "<div class=\"p-summary\">%s</div>" (org-export-data (plist-get info :summary) info)) |