Function: html2text-fix-paragraph
html2text-fix-paragraph is a byte-compiled function defined in
html2text.el.gz.
Signature
(html2text-fix-paragraph P1 P2)
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/html2text.el.gz
;;
;; </Functions to be called to format a tag-pair>
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; <Functions to be called to fix up paragraphs>
;;
(defun html2text-fix-paragraph (p1 p2)
(goto-char p1)
(let ((refill-start)
(refill-stop))
(when (re-search-forward "<br>$" p2 t)
(goto-char p1)
(when (re-search-forward ".+[^<][^b][^r][^>]$" p2 t)
(beginning-of-line)
(setq refill-start (point))
(goto-char p2)
(re-search-backward ".+[^<][^b][^r][^>]$" refill-start t)
(forward-line 1)
(end-of-line)
;; refill-stop should ideally be adjusted to
;; accommodate the "<br>" strings which are removed
;; between refill-start and refill-stop. Can simply
;; be returned from my-replace-string
(setq refill-stop (+ (point)
(html2text-replace-string
"<br>" ""
refill-start (point))))
;; (message "Point = %s refill-stop = %s" (point) refill-stop)
;; (sleep-for 4)
(fill-region refill-start refill-stop))))
(html2text-replace-string "<br>" "" p1 p2))