Omit after/before-string overlay props w/ ox-clip
Otherwise you get fringe characters inserted into the htmlized output. Like !'s for every flycheck error.
This commit is contained in:
parent
aafed6d8a0
commit
4bab5a948a
1 changed files with 10 additions and 1 deletions
|
@ -44,4 +44,13 @@ properties and font-locking et all)."
|
||||||
(pcase major-mode
|
(pcase major-mode
|
||||||
((or `markdown-mode `gfm-mode)
|
((or `markdown-mode `gfm-mode)
|
||||||
(+org--yank-html-buffer (markdown)))
|
(+org--yank-html-buffer (markdown)))
|
||||||
(_ (ox-clip-formatted-copy beg end))))
|
(_
|
||||||
|
;; Omit after/before-string overlay properties in htmlized regions, so we
|
||||||
|
;; don't get fringe characters for things like flycheck or git-gutter.
|
||||||
|
(letf! (defun htmlize-get-text-with-display (beg end)
|
||||||
|
(let ((text (buffer-substring-no-properties beg end)))
|
||||||
|
(htmlize-copy-prop 'display beg end text)
|
||||||
|
(htmlize-copy-prop 'htmlize-link beg end text)
|
||||||
|
;; (setq text (htmlize-add-before-after-strings beg end text))
|
||||||
|
text))
|
||||||
|
(ox-clip-formatted-copy beg end)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue