From 648a52ae69a1786774e2e94c69f43f7c1d6f24e0 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 13 May 2019 15:04:46 -0400 Subject: [PATCH] Fix problems in shr when indenting tables * lisp/net/shr.el (shr-mark-fill, shr-insert-table): Fix problems when block-quoting/
  • -ing a table -- the indentation/prefix was inserted twice (bug#32277). --- lisp/net/shr.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 2f628e1caa2..4820d8b4365 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1790,7 +1790,8 @@ The preference is a float determined from `shr-prefer-media-type'." (defun shr-mark-fill (start) ;; We may not have inserted any text to fill. - (unless (= start (point)) + (when (and (/= start (point)) + (not (get-text-property start 'shr-table-id))) (put-text-property start (1+ start) 'shr-indentation shr-indentation))) @@ -2087,7 +2088,8 @@ flags that control whether to collect or render objects." (setq max (max max (nth 2 column)))) max))) (dotimes (_ (max height 1)) - (shr-indent) + (when (bolp) + (shr-indent)) (insert shr-table-vertical-line "\n")) (dolist (column row) (when (> (nth 2 column) -1) -- 2.39.2