emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 648a52a: Fix problems in shr when indenting tables


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 648a52a: Fix problems in shr when indenting tables
Date: Mon, 13 May 2019 15:08:25 -0400 (EDT)

branch: master
commit 648a52ae69a1786774e2e94c69f43f7c1d6f24e0
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Fix problems in shr when indenting tables
    
    * lisp/net/shr.el (shr-mark-fill, shr-insert-table): Fix problems
    when block-quoting/<li>-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 2f628e1..4820d8b 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]