Don't remove too much white space at the end of documents
* lisp/net/shr.el (shr--remove-blank-lines-at-the-end): Don't remove too much white space -- leave it on the last line (in case there's a background color).
This commit is contained in:
parent
9dcf599893
commit
61b2e837d8
2 changed files with 3 additions and 6 deletions
|
@ -281,15 +281,12 @@ DOM should be a parse tree as generated by
|
|||
(defun shr--remove-blank-lines-at-the-end (start end)
|
||||
(save-restriction
|
||||
(save-excursion
|
||||
(current-buffer)
|
||||
(narrow-to-region start end)
|
||||
(goto-char end)
|
||||
(when (and (re-search-backward "[^ \n]" nil t)
|
||||
(not (eobp)))
|
||||
(forward-char 1)
|
||||
(delete-region (point) (point-max))
|
||||
(unless (bolp)
|
||||
(insert "\n"))))))
|
||||
(forward-line 1)
|
||||
(delete-region (point) (point-max))))))
|
||||
|
||||
(defun shr-copy-url (&optional image-url)
|
||||
"Copy the URL under point to the kill ring.
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
*
|
||||
|
||||
Lala
|
||||
Lala
|
Loading…
Add table
Reference in a new issue