use replace-regexp-in-string instead of string-replace
string-replace is new of emacs 28, while replace-regexp-in-string is quite old. This avoids the backport, and should be a tad faster since it don't have to waste cycle to regexp-quote "\n". Tested on emacs 27.2 Signed-off-by: Justin Abrahms <justin@abrah.ms>
This commit is contained in:
parent
b6b6f595f2
commit
087359e851
11
ox-gemini.el
11
ox-gemini.el
@ -21,15 +21,6 @@
|
||||
(require 'ox-ascii)
|
||||
(require 'cl-lib)
|
||||
|
||||
;; backport for older emacs verisons
|
||||
(if (not (fboundp 'string-replace))
|
||||
(progn
|
||||
(defun string-replace (from to in)
|
||||
(replace-regexp-in-string (regexp-quote from) to in nil 'literal))
|
||||
(declare-function string-replace "ox-gemini")
|
||||
))
|
||||
|
||||
|
||||
;; TODO:
|
||||
;; Sublists aren't supported in gemini
|
||||
;; There's a trailing space after inline code samples
|
||||
@ -60,7 +51,7 @@
|
||||
|
||||
(defun org-gemini-paragraph (_paragraph contents _info)
|
||||
"CONTENTS is the text of the paragraph."
|
||||
(concat (string-replace "\n" " " contents)
|
||||
(concat (replace-regexp-in-string "\n" " " contents)
|
||||
"\n"))
|
||||
|
||||
(defun org-gemini-item (_input contents _info)
|
||||
|
Loading…
Reference in New Issue
Block a user