Skip to content

Commit

Permalink
Add a utility function for turning html strings into normal text.
Browse files Browse the repository at this point in the history
Could be useful for the json-ld issue brought up in #58.
  • Loading branch information
Chobbes committed Sep 9, 2021
1 parent f27b111 commit 96e955e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions org-chef-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
(seq-filter (lambda (x) (not (stringp x)))
(dom-children dom)))

(defun org-chef-render-html (text)
"Turn an html string into normal text."
(with-temp-buffer
(insert text)
(shr-render-buffer (current-buffer))
(buffer-string)))

(defun org-chef-insert-org-list (lst &optional bullet)
"Insert LST as an ‘org-mode’ plain list.
Expand Down

0 comments on commit 96e955e

Please sign in to comment.