Server IP : 111.118.215.189 / Your IP : 18.117.158.174 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/gnus/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:12 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/gnus/html2text.el ;;; in Emacs version 24.3.1 ;;; 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") ("˜" . "~")) (#$ . 635)) #@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") (#$ . 1689)) #@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)) (#$ . 2392)) #@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") (#$ . 3275)) #@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 (#$ . 3554)]) #@35 Get value of ATTRIBUTE from LIST. (defalias 'html2text-attr-value #[(list attribute) "\302 \"A@\207" [attribute list assoc] 3 (#$ . 3874)]) (defalias 'html2text-get-attr #[(p1 p2) "b\210\306\307 \310#\210\311`S S\"\312\n!\313\314@A@\3158\316\317\320\"\203P \312\321\"@\317\321\"T\313O\211D\fB*\202c \317\322\"\203c \314\323OD\fBGW\203\344 \317\320\"\203\222 \312\321\"@\317\321\"T\313O\211D\fB*\202\315 \317\324\"\203\250 \316\313OD\fB\202\315 \317\322\"\203\276 \314\323OD\fB\202\315 \321\230\203\315 D\fBTT8\202c @A@\3158\316\317\321\"\204\314\316O\321\230\204\313D\fBGSW\203Q\317\321\"\204:\314\316O\321\230\204:\323\313O\321\230\204:\313D\fBTT8\202\203o\317\321\"\204o\323\313O\321\230\204o\313D\fB\f.\207" [p1 p2 attr-string tmp-list attr-list counter re-search-forward " +[^ ]" t buffer-substring-no-properties split-string nil 0 2 1 string-match "[^ ]=[^ ]" "=" "[^ ]=\\'" -1 "\\`=[^ ]" prev this next index value attr] 6]) (defalias 'html2text-clean-list-items #[(p1 p2 list-type) "b\210\305\211\306\307\310#\203 T\202 b\210\n W\205H \nT\306\307d\310#\210\f\311\230\2033 \312c\210\202 \f\313\230\203B \314\315\n\"c\210\202 \316c\210\202 *\207" [p1 items item-nr p2 list-type 0 search-forward "<li>" t "ul" " o " "ol" format " %s: " " x "] 4]) (defalias 'html2text-clean-dtdd #[(p1 p2) "b\210\306\211\307\310\311#\203 \nT\202 b\210 \nW\205\202 T\312\313d\311#\210\314\315!\2037 ``\316\314\315!!Z|\210`\306\312\317d\311#\210\314\315!\203o \316\314\315!!\316\314\320!!\\`Zb\210``\\|\210`+\202w `\316\314\320!!Z\321 \f\322\323$\210*\202 *\207" [p1 item-nr items p2 def-p2 def-p1 0 search-forward "<dt>" t re-search-forward "<dt>\\([ ]*\\)" match-string 1 string-width "\\([ ]*\\)\\(</dt>\\|<dd>\\)" 2 put-text-property face bold mw1 mw2 mw] 5]) (defalias 'html2text-delete-tags #[(p1 p2 p3 p4) " |\210\n ZZ ZZ|\207" [p1 p2 p3 p4] 4]) (defalias 'html2text-delete-single-tag #[(p1 p2) " |\207" [p1 p2] 2]) (defalias 'html2text-clean-hr #[(p1 p2) "\303 \"\210b\210\304\305!\210\306\n\307\"c\207" [p1 p2 fill-column html2text-delete-single-tag newline 1 make-string 45] 3]) (defalias 'html2text-clean-ul #[(p1 p2 p3 p4) "\304 \n$\210\305\n ZZ\306#\207" [p1 p2 p3 p4 html2text-delete-tags html2text-clean-list-items "ul"] 5]) (defalias 'html2text-clean-ol #[(p1 p2 p3 p4) "\304 \n$\210\305\n ZZ\306#\207" [p1 p2 p3 p4 html2text-delete-tags html2text-clean-list-items "ol"] 5]) (defalias 'html2text-clean-dl #[(p1 p2 p3 p4) "\304 \n$\210\305\n ZZ\"\207" [p1 p2 p3 p4 html2text-delete-tags html2text-clean-dtdd] 5]) (defalias 'html2text-clean-center #[(p1 p2 p3 p4) "\304 \n$\210\305\n ZZ\"\207" [p1 p2 p3 p4 html2text-delete-tags center-region] 5]) (defalias 'html2text-clean-bold #[(p1 p2 p3 p4) "\304 \305\306$\210\307\n $\207" [p2 p3 p1 p4 put-text-property face bold html2text-delete-tags] 5]) (defalias 'html2text-clean-title #[(p1 p2 p3 p4) "\304 \305\306$\210\307\n $\207" [p2 p3 p1 p4 put-text-property face bold html2text-delete-tags] 5]) (defalias 'html2text-clean-underline #[(p1 p2 p3 p4) "\304 \305\306$\210\307\n $\207" [p2 p3 p1 p4 put-text-property face underline html2text-delete-tags] 5]) (defalias 'html2text-clean-italic #[(p1 p2 p3 p4) "\304 \305\306$\210\307\n $\207" [p2 p3 p1 p4 put-text-property face italic html2text-delete-tags] 5]) (defalias 'html2text-clean-font #[(p1 p2 p3 p4) "\304 \n$\207" [p1 p2 p3 p4 html2text-delete-tags] 5]) (defalias 'html2text-clean-blockquote #[(p1 p2 p3 p4) "\304 \n$\207" [p1 p2 p3 p4 html2text-delete-tags] 5]) (defalias 'html2text-clean-anchor #[(p1 p2 p3 p4) "\305 \"\306\n\307\"\f|\210\205, b\210\310\311\"\203# \312\313O\202$ c\210\314`\315\316$*\207" [p1 p2 attr-list href p4 html2text-get-attr html2text-attr-value "href" string-match "\\`['\"].*['\"]\\'" 1 -1 put-text-property face bold] 5]) (defalias 'html2text-fix-paragraph #[(p1 p2) "b\210\304\211\305\306\307#\203<