X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fhtml2text.el;h=78cecd923561d0bdad6acc89249c37e75c1a7c8a;hb=1c2ed0ce5abe2181e51f777171f8cd40a547e5a9;hp=8cfd9b9f903f413bfe212eafbe851b8a368f2811;hpb=8a021aefde6f386bf1a5d108798f7a93829aee85;p=gnus diff --git a/lisp/html2text.el b/lisp/html2text.el index 8cfd9b9f9..78cecd923 100644 --- a/lisp/html2text.el +++ b/lisp/html2text.el @@ -1,6 +1,6 @@ -;;; html2text.el --- a simple html to plain text converter +;;; html2text.el --- a simple html to plain text converter -*- coding: utf-8 -*- -;; Copyright (C) 2002-2011 Free Software Foundation, Inc. +;; Copyright (C) 2002-2014 Free Software Foundation, Inc. ;; Author: Joakim Hove @@ -65,14 +65,14 @@ ("–" . "-") ("‰" . "%%") ("±" . "+-") - ("£" . "£") + ("£" . "£") (""" . "\"") ("»" . ">>") ("&rdquo" . "\"") ("®" . "(R)") ("›" . ")") ("’" . "'") - ("§" . "§") + ("§" . "§") ("¹" . "^1") ("²" . "^2") ("³" . "^3") @@ -123,7 +123,7 @@ If this list contains the element \"font\".") This is an alist where each dotted pair consists of a tag, and then the name of a function to be called when this tag is found. The function is called with the arguments p1, p2, p3 and p4. These are -demontrated below: +demonstrated below: \" This is bold text \" ^ ^ ^ ^ @@ -204,7 +204,7 @@ formatting, and then moved afterward.") ;; size=3 ((string-match "[^ ]=[^ ]" this) (let ((attr (nth 0 (split-string this "="))) - (value (substring prev (1+ (string-match "=" this))))) + (value (substring this (1+ (string-match "=" this))))) (setq attr-list (cons (list attr value) attr-list)))) ;; size =3 ((string-match "\\`=[^ ]" this) @@ -410,7 +410,7 @@ fashion, quite close to pure guess-work. It does work in some cases though." (while (re-search-forward "^
$" nil t) (delete-region (match-beginning 0) (match-end 0))) ;; Removing lonely
on a single line, if they are left intact we - ;; dont have any paragraphs at all. + ;; don't have any paragraphs at all. (goto-char (point-min)) (while (not (eobp)) (let ((p1 (point)))