diff options
-rw-r--r-- | ennum.el | 32 |
1 files changed, 15 insertions, 17 deletions
@@ -263,23 +263,21 @@ the current state of all its variables." (let* ((tree (org-element-parse-buffer)) (links (org-element-map tree 'link (lambda (link) - (pcase link - (`(link ,properties . ,_) - (let ((link-type (org-element-property :type link)) - (path (org-element-property :path link))) - (pcase link-type - ("post" - (ennum-make-post-link - :path path - :target-title (if (org-element-contents link) - 'not-required 'required))) - ("video" - (ennum-make-video-link - :path path - :poster (ennum-video-poster path))) - (_ (ennum-make-link - :type (intern link-type) - :path path)))))))))) + (let ((link-type (org-element-property :type link)) + (path (org-element-property :path link))) + (pcase link-type + ("post" + (ennum-make-post-link + :path path + :target-title (if (org-element-contents link) + 'not-required 'required))) + ("video" + (ennum-make-video-link + :path path + :poster (ennum-video-poster path))) + (_ (ennum-make-link + :type (intern link-type) + :path path)))))))) (ennum-make-post :filename filename :slug (file-name-base filename) |