1
0
Fork 0

Restructure loop body

This commit is contained in:
Bram Schoenmakers 2023-12-27 20:54:34 +01:00
parent ef9b4c0578
commit 0442dd3848
Signed by: bram
GPG key ID: 0CCD19DFDC63258F

View file

@ -153,13 +153,11 @@ FastGPT with the following prompt:
(with-temp-buffer
(insert string)
(dolist (entry kagi--markup-to-face)
(cl-destructuring-bind (start end face) entry
(goto-char (point-min))
(let ((start (nth 0 entry))
(end (nth 1 entry))
(face (nth 2 entry))
(regexp (rx (seq (literal start) (group (* any)) (literal end)))))
(let ((regexp (rx (seq (literal start) (group (* any)) (literal end)))))
(while (re-search-forward regexp nil t)
(replace-match (propertize (match-string 1) 'font-lock-face face) t nil))))
(replace-match (propertize (match-string 1) 'font-lock-face face) t nil)))))
(buffer-string)))
(defun kagi--format-output (output)