emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/htmlize 4f0e317 085/134: Show `display' strings with the `


From: ELPA Syncer
Subject: [nongnu] elpa/htmlize 4f0e317 085/134: Show `display' strings with the `htmlize-literal' property as raw HTML.
Date: Sat, 7 Aug 2021 09:17:12 -0400 (EDT)

branch: elpa/htmlize
commit 4f0e317d38b043ffc757079fa4ee2d82962762e4
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>

    Show `display' strings with the `htmlize-literal' property as raw HTML.
---
 htmlize.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/htmlize.el b/htmlize.el
index ae75ba2..4340d1c 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -496,7 +496,8 @@ next-single-char-property-change")))
       escaped-text)))
 
 (defun htmlize-escape-or-link (string)
-  ;; Escape STRING and/or add hyperlinks.
+  ;; Escape STRING and/or add hyperlinks.  STRING comes from a
+  ;; `display' property.
   (let ((pos 0) (end (length string)) outlist)
     (while (< pos end)
       (let* ((link (get-char-property pos 'htmlize-link string))
@@ -504,9 +505,12 @@ next-single-char-property-change")))
                                 pos 'htmlize-link string end))
              (chunk (substring string pos next-link-change)))
         (push
-         (if link
-             (htmlize-format-link link chunk)
-           (htmlize-protect-string chunk))
+         (cond (link
+                (htmlize-format-link link chunk))
+               ((get-char-property 0 'htmlize-literal chunk)
+                chunk)
+               (t
+                (htmlize-protect-string chunk)))
          outlist)
         (setq pos next-link-change)))
     (htmlize-concat (nreverse outlist))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]