]> git.eshelyaron.com Git - emacs.git/commitdiff
shr.el (shr-tag-li): Get <li> indentation right.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 4 Oct 2010 13:17:48 +0000 (13:17 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 4 Oct 2010 13:17:48 +0000 (13:17 +0000)
shr.el (shr-tag-li): Get <li> indentation even righter.
shr.el (shr-tag-blockquote): Ensure paragraph start.

lisp/gnus/ChangeLog
lisp/gnus/shr.el

index 0fe882c8f213242c131d6d2a46b67e0f3a236dc5..33a760eb6f2190f5b1da2b520d50669bf178b167 100644 (file)
@@ -3,6 +3,9 @@
        * shr.el (shr-ensure-paragraph): Fix the non-empty line case.
        (shr-insert): Tweak line breaking.
        (shr-insert): Handle <pre> better.
+       (shr-tag-li): Get <li> indentation right.
+       (shr-tag-li): Get <li> indentation even righter.
+       (shr-tag-blockquote): Ensure paragraph start.
 
 2010-10-04  Julien Danjou  <julien@danjou.info>
 
index 564234bea924e43b25c69e62b56964d96fbf6c8c..c2c2c2ed2802dc0ae31442e924de468834883fe4 100644 (file)
@@ -220,6 +220,7 @@ fit these criteria."
     (shr-ensure-newline)))
 
 (defun shr-tag-blockquote (cont)
+  (shr-ensure-paragraph)
   (let ((shr-indentation (+ shr-indentation 4)))
     (shr-generic cont)))
 
@@ -289,12 +290,15 @@ Return a string with image data."
 
 (defun shr-tag-li (cont)
   (shr-ensure-newline)
-  (if (numberp shr-list-mode)
-      (progn
-       (insert (format "%d " shr-list-mode))
-       (setq shr-list-mode (1+ shr-list-mode)))
-    (insert "* "))
-  (shr-generic cont))
+  (let* ((bullet
+         (if (numberp shr-list-mode)
+             (prog1
+                 (format "%d " shr-list-mode)
+               (setq shr-list-mode (1+ shr-list-mode)))
+           "* "))
+        (shr-indentation (+ shr-indentation (length bullet))))
+    (insert bullet)
+    (shr-generic cont)))
 
 (defun shr-tag-br (cont)
   (unless (bobp)