%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/obsolete/ |
Current File : //usr/local/share/emacs/27.2/lisp/obsolete/html2text.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr))) #@344 The map of entity to text. This is an alist were each element is a dotted pair consisting of an old string, and a replacement string. This replacement is done by the function `html2text-substitute' which basically performs a `replace-string' operation for every element in the list. This is completely verbatim - without any use of REGEXP. (defvar html2text-replace-list '(("´" . "`") ("&" . "&") ("'" . "'") ("¦" . "|") ("¢" . "c") ("ˆ" . "^") ("©" . "(C)") ("¤" . "(#)") ("°" . "degree") ("÷" . "/") ("€" . "e") ("½" . "1/2") (">" . ">") ("¿" . "?") ("«" . "<<") ("&ldquo" . "\"") ("‹" . "(") ("‘" . "`") ("<" . "<") ("—" . "--") (" " . " ") ("–" . "-") ("‰" . "%%") ("±" . "+-") ("£" . "£") (""" . "\"") ("»" . ">>") ("&rdquo" . "\"") ("®" . "(R)") ("›" . ")") ("’" . "'") ("§" . "§") ("¹" . "^1") ("²" . "^2") ("³" . "^3") ("˜" . "~")) (#$ . 486)) #@577 A list of removable tags. This is a list of tags which should be removed, without any formatting. Note that tags in the list are presented *without* any "<" or ">". All occurrences of a tag appearing in this list are removed, irrespective of whether it is a closing or opening tag, or if the tag has additional attributes. The deletion is done by the function `html2text-remove-tags'. For instance the text: "Here comes something <font size"+3" face="Helvetica"> big </font>." will be reduced to: "Here comes something big." If this list contains the element "font". (defvar html2text-remove-tag-list '("html" "body" "p" "img" "dir" "head" "div" "br" "font" "title" "meta") (#$ . 1540)) #@472 An alist of tags and processing functions. 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 demonstrated below: "<b> This is bold text </b>" ^ ^ ^ ^ | | | | p1 p2 p3 p4 Then the called function will typically format the text somewhat and remove the tags. (defvar html2text-format-tag-list '(("b" . html2text-clean-bold) ("strong" . html2text-clean-bold) ("u" . html2text-clean-underline) ("i" . html2text-clean-italic) ("em" . html2text-clean-italic) ("blockquote" . html2text-clean-blockquote) ("a" . html2text-clean-anchor) ("ul" . html2text-clean-ul) ("ol" . html2text-clean-ol) ("dl" . html2text-clean-dl) ("center" . html2text-clean-center)) (#$ . 2243)) #@201 Another list of removable tags. This is a list of tags which are removed similarly to the list `html2text-remove-tag-list' - but these tags are retained for the formatting, and then moved afterward. (defvar html2text-remove-tag-list2 '("li" "dt" "dd" "meta") (#$ . 3126)) #@63 Replace FROM-STRING with TO-STRING in region from MIN to MAX. (defalias 'html2text-replace-string #[(from-string to-string min max) "b\210\306 !\306\n!Z\307\310\n \311#\203 \312 !\210\f\\\202 *\207" [min to-string from-string change delta max string-width 0 search-forward t replace-match] 4 (#$ . 3405)]) #@35 Get value of ATTRIBUTE from LIST. (defalias 'html2text-attr-value #[(list attribute) "\302 \"A@\207" [attribute list assoc] 3 (#$ . 3725)]) (defalias 'html2text-get-attr #[(p1 p2) "b\210\303\304 \305#\210\306\303\307 \305#\203>