[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/htmlize c19d29c 012/134: Version 0.67.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/htmlize c19d29c 012/134: Version 0.67. |
Date: |
Sat, 7 Aug 2021 09:16:57 -0400 (EDT) |
branch: elpa/htmlize
commit c19d29c1abad0a41e2ad5b94c6bcf4034f60b810
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>
Version 0.67.
---
htmlize.el | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/htmlize.el b/htmlize.el
index c8fde00..23f840f 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -98,7 +98,7 @@
(defvar font-lock-auto-fontify)
(defvar global-font-lock-mode))
-(defconst htmlize-version "0.65")
+(defconst htmlize-version "0.67")
;; Incantations to make custom stuff work without customize, e.g. on
;; XEmacs 19.14 or GNU Emacs 19.34.
@@ -490,8 +490,8 @@ in the system directories."
(with-temp-buffer
(insert-file-contents rgb-file)
(while (not (eobp))
- (cond ((looking-at "^!")
- ;; Skip comments
+ (cond ((looking-at "^\\s-*\\([!#]\\|$\\)")
+ ;; Skip comments and empty lines.
)
((looking-at "[ \t]*\\([0-9]+\\)[ \t]+\\([0-9]+\\)[
\t]+\\([0-9]+\\)[ \t]+\\(.*\\)")
(setf (gethash (downcase (match-string 4)) hash)
@@ -822,6 +822,15 @@ in the system directories."
(and (htmlize-face-boldp face-object) "</b>")
"</font>"))
+(defun htmlize-despam-address (string)
+ "Replace every occurrence of '@' in STRING with @.
+`htmlize-make-hyperlinks' uses this to spam-protect mailto links
+without modifying their meaning."
+ ;; Suggested by Ville Skytta.
+ (while (string-match "@" string)
+ (setq string (replace-match "@" nil t string)))
+ string)
+
(defun htmlize-make-hyperlinks ()
"Make hyperlinks in HTML."
;; Function originally submitted by Ville Skytta. Rewritten by
@@ -833,7 +842,11 @@ in the system directories."
(let ((address (match-string 3))
(link-text (match-string 1)))
(delete-region (match-beginning 0) (match-end 0))
- (insert "<<a href=\"mailto:" address "\">" link-text "</a>>")))
+ (insert "<<a href=\"mailto:"
+ (htmlize-despam-address address)
+ "\">"
+ (htmlize-despam-address link-text)
+ "</a>>")))
(goto-char (point-min))
(while (re-search-forward "<\\(\\(URL:\\)?\\([a-zA-Z]+://[^;]+\\)\\)>"
nil t)
- [nongnu] elpa/htmlize 0a17c7c 087/134: It's `htmlize-running-xemacs', not `running-xemacs'., (continued)
- [nongnu] elpa/htmlize 0a17c7c 087/134: It's `htmlize-running-xemacs', not `running-xemacs'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 6f9bb1f 100/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize f74ea31 106/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 32c69e9 108/134: Add htmlize-face-overrides., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 1f7bd72 110/134: Update supported version from 21 -> 22 in README, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 06772e6 117/134: Don't use `alist-get', it is not available in Emacs 24. (#17), ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize a872d6b 119/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 33aa3cb 023/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 70529dd 028/134: Abandon compatibility with ancient Emacsen., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize bb3bda0 030/134: Trim comment., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize c19d29c 012/134: Version 0.67.,
ELPA Syncer <=
- [nongnu] elpa/htmlize 9ccd74f 010/134: Version 0.64., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 9349d4b 014/134: Version 1.4., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 2e7cb2c 021/134: Version 1.37., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 1a14031 022/134: New file: .gitignore, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 665abf9 024/134: Use `put' instead of `plist-put'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 814e537 026/134: Update instructions for git., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize bcf1d44 025/134: Update copyright and compress individual years to ranges., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 3477a7d 027/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 61760b4 075/134: Implement the `htmlize-link' property to embed links in the HTML., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 296b18e 033/134: Extract a bit of code outside buffer-substring-no-invisible., ELPA Syncer, 2021/08/07