diff options
Diffstat (limited to 'sx-question-print.el')
-rw-r--r-- | sx-question-print.el | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/sx-question-print.el b/sx-question-print.el index 2a0a035..fe64392 100644 --- a/sx-question-print.el +++ b/sx-question-print.el @@ -431,29 +431,19 @@ If ID is nil, use FALLBACK-ID instead." "If there's a pre block ahead, handle it, skip it and return t. Handling means to turn it into a button and remove erroneous font-locking." - (let (beg end text) + (let (beg end) (when (markdown-match-pre-blocks (save-excursion (skip-chars-forward "\r\n[:blank:]") (setq beg (point)))) (setq end (point)) - (setq text - (sx--unindent-text - (buffer-substring - (save-excursion - (goto-char beg) - (line-beginning-position)) - end))) - (put-text-property beg end 'display nil) - (make-text-button - beg end - 'face 'markdown-pre-face - 'sx-button-copy text - :type 'sx-question-mode-code-block)))) + (sx-babel--make-pre-button + (buffer-substring + (save-excursion + (goto-char beg) + (line-beginning-position)) + end))))) (provide 'sx-question-print) ;;; sx-question-print.el ends here -;; Local Variables: -;; lexical-binding: t -;; End: |