(defvar shr-folding-mode nil)
(defvar shr-state nil)
(defvar shr-start nil)
+(defvar shr-indentation 0)
(defvar shr-width 70)
(shr-descend sub)))))
(defun shr-tag-p (cont)
- (shr-ensure-newline)
- (insert "\n")
+ (unless (bobp)
+ (shr-ensure-newline)
+ (insert "\n"))
(shr-generic cont)
(insert "\n"))
(not (get-buffer-window (current-buffer))))
(create-image data nil t)
(let* ((image (create-image data nil t))
- (size (image-size image))
+ (size (image-size image t))
(width (car size))
(height (cdr size))
(edges (window-inside-pixel-edges
(shr-ensure-newline)))
(defun shr-tag-blockquote (cont)
- (shr-pre cont))
+ (let ((shr-indentation (+ shr-indentation 4)))
+ (shr-tag-pre cont)))
(defun shr-ensure-newline ()
(unless (zerop (current-column))
(if (> (+ column (length elem) 1) shr-width)
(insert "\n")
(insert " ")))
+ (when (and (bolp)
+ (plusp shr-indentation))
+ (insert (make-string shr-indentation ? )))
;; The shr-start is a special variable that is used to pass
;; upwards the first point in the buffer where the text really
;; starts.