/[emacs]/emacs/lisp/gnus/html2text.el
ViewVC logotype

Diff of /emacs/lisp/gnus/html2text.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by miles, Mon Nov 1 23:06:34 2004 UTC revision 1.6 by miles, Thu Nov 4 08:12:39 2004 UTC
# Line 144  formatting, and then moved afterward.") Line 144  formatting, and then moved afterward.")
144    "Get value of ATTRIBUTE from LIST."    "Get value of ATTRIBUTE from LIST."
145    (nth 1 (assoc attribute list)))    (nth 1 (assoc attribute list)))
146    
147  (defun html2text-get-attr (p1 p2 tag)  (defun html2text-get-attr (p1 p2)
148    (goto-char p1)    (goto-char p1)
149    (re-search-forward " +[^ ]" p2 t)    (re-search-forward " +[^ ]" p2 t)
150    (let* ((attr-string (buffer-substring-no-properties (1- (point)) (1- p2)))    (let* ((attr-string (buffer-substring-no-properties (1- (point)) (1- p2)))
# Line 320  formatting, and then moved afterward.") Line 320  formatting, and then moved afterward.")
320    ;; If someone can explain how to make the URL clickable I will surely    ;; If someone can explain how to make the URL clickable I will surely
321    ;; improve upon this.    ;; improve upon this.
322    ;; Maybe `goto-addr.el' can be used here.    ;; Maybe `goto-addr.el' can be used here.
323    (let* ((attr-list (html2text-get-attr p1 p2 "a"))    (let* ((attr-list (html2text-get-attr p1 p2))
324           (href (html2text-attr-value attr-list "href")))           (href (html2text-attr-value attr-list "href")))
325      (delete-region p1 p4)      (delete-region p1 p4)
326      (when href      (when href
# Line 418  See the documentation for that variable. Line 418  See the documentation for that variable.
418                                  (point-max) t)                                  (point-max) t)
419          (let ((p1)          (let ((p1)
420                (p2 (point))                (p2 (point))
421                (p3) (p4)                (p3) (p4))
               (attr (match-string 1)))  
422            (search-backward "<" (point-min) t)            (search-backward "<" (point-min) t)
423            (setq p1 (point))            (setq p1 (point))
424            (re-search-forward (format "</%s>" tag) (point-max) t)            (re-search-forward (format "</%s>" tag) (point-max) t)

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26