Add support for <dl>, <dt> and <dd>.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 18 Jun 2013 11:15:32 +0000 (13:15 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 18 Jun 2013 11:15:32 +0000 (13:15 +0200)
(shr-tag-dl, shr-tag-dt, shr-tag-dd): Add support for <dl>, <dt> and
<dd>.

lisp/ChangeLog
lisp/shr.el

index 8a93331..695fb16 100644 (file)
@@ -3,6 +3,8 @@
        * shr.el (shr-tag-table): Insert the images after the table, so that
        they're not covered by the table colourisation, which often looked
        awkward.
+       (shr-tag-dl, shr-tag-dt, shr-tag-dd): Add support for <dl>, <dt> and
+       <dd>.
 
 2013-06-18  Katsumi Yamaoka  <yamaoka@jpl.org>
 
index 1c940be..f3a396a 100644 (file)
@@ -1139,6 +1139,21 @@ ones, in case fg and bg are nil."
     (shr-generic cont))
   (shr-ensure-paragraph))
 
+(defun shr-tag-dl (cont)
+  (shr-ensure-paragraph)
+  (shr-generic cont)
+  (shr-ensure-paragraph))
+
+(defun shr-tag-dt (cont)
+  (shr-ensure-newline)
+  (shr-generic cont)
+  (shr-ensure-newline))
+
+(defun shr-tag-dd (cont)
+  (shr-ensure-newline)
+  (let ((shr-indentation (+ shr-indentation 4)))
+    (shr-generic cont)))
+
 (defun shr-tag-ul (cont)
   (shr-ensure-paragraph)
   (let ((shr-list-mode 'ul))