Function: html2text-clean-anchor

html2text-clean-anchor is a byte-compiled function defined in html2text.el.gz.

Signature

(html2text-clean-anchor P1 P2 P3 P4)

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/html2text.el.gz
(defun html2text-clean-anchor (p1 p2 _p3 p4)
  ;; If someone can explain how to make the URL clickable I will surely
  ;; improve upon this.
  ;; Maybe `goto-addr.el' can be used here.
  (let* ((attr-list (html2text-get-attr p1 p2))
	 (href (html2text-attr-value attr-list "href")))
    (delete-region p1 p4)
    (when href
      (goto-char p1)
      (insert (if (string-match "\\`['\"].*['\"]\\'" href)
		  (substring href 1 -1) href))
      (put-text-property p1 (point) 'face 'bold))))