Restructure loop body
This commit is contained in:
parent
ef9b4c0578
commit
0442dd3848
1 changed files with 5 additions and 7 deletions
8
kagi.el
8
kagi.el
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue