[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/htmlize 3308bf9 052/134: Preserve the `display' property d
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/htmlize 3308bf9 052/134: Preserve the `display' property during untabification. |
Date: |
Sat, 7 Aug 2021 09:17:05 -0400 (EDT) |
branch: elpa/htmlize
commit 3308bf94adc2e5fc72bbe147d76c0c9cee5d4291
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>
Preserve the `display' property during untabification.
---
htmlize.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/htmlize.el b/htmlize.el
index 6cb6d6d..7591ba7 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -437,7 +437,8 @@ next-single-char-property-change")))
(defun htmlize-generate-image (imgprops)
(cond ((plist-get imgprops :file)
(format "<img src=\"%s\" />"
- (htmlize-protect-string (plist-get imgprops :file))))))
+ (htmlize-protect-string (file-relative-name
+ (plist-get imgprops :file)))))))
(defconst htmlize-ellipsis "...")
(put-text-property 0 (length htmlize-ellipsis) 'htmlize-ellipsis t
htmlize-ellipsis)
@@ -545,8 +546,13 @@ next-single-char-property-change")))
(incf column (- match-pos last-match))
;; Calculate tab size based on tab-width and COLUMN.
(setq tab-size (- tab-width (% column tab-width)))
- ;; Expand the tab.
- (push (aref htmlize-tab-spaces tab-size) chunks)
+ ;; Expand the tab, carefully recreating the `display'
+ ;; property if one was on the TAB.
+ (let ((display (get-text-property match-pos 'display text))
+ (expanded-tab (aref htmlize-tab-spaces tab-size)))
+ (when display
+ (put-text-property 0 tab-size 'display display expanded-tab))
+ (push expanded-tab chunks))
(incf column tab-size)
(setq chunk-start (1+ match-pos)))
(t
- [nongnu] elpa/htmlize 380ba4b 084/134: Bumped version., (continued)
- [nongnu] elpa/htmlize 380ba4b 084/134: Bumped version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 5b29cde 090/134: Update NEWS., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 7eb326a 099/134: Fix package header format, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 4570d0a 103/134: Add README., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 8f46e10 105/134: Use htmlpreview., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 78318a2 114/134: Support face-remapping-alist. (#13), ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 9b49540 133/134: Replace cl with cl-lib, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize a040bdd 127/134: Don't try to call color-instance-rgb-components., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 0a73b2b 043/134: Change `insert-text' method to `text-markup', so that the text can be, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize ec862a1 049/134: Get rid of byte-compiler warnings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 3308bf9 052/134: Preserve the `display' property during untabification.,
ELPA Syncer <=
- [nongnu] elpa/htmlize 62020d5 054/134: Fix erroneous comment., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize ef8b865 055/134: Add some docs., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 148ac7d 061/134: Consistently eliminate unnecessary string creation in (apply #'concat ...)., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 3faeac8 069/134: Explicitly mark sort as stable., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize af69752 062/134: Consistently handle the multitude of ways to specify the `face' property., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 0ba773b 067/134: Specify some `rgb.txt' locations that actually exist!, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 6baf891 070/134: Implement customizable image transformation, htmlize-force-inline-images, and image alt text., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize ba5ddf3 073/134: Enable edebug stepping into htmlize-lexlet., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 6b3b3b6 077/134: Purge asterisks from variable docstrings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 7947b8b 074/134: Don't generate ALT text larger than 100 chars or containing control chars., ELPA Syncer, 2021/08/07