Perform non-greedy match between the start and end marker
This commit is contained in:
parent
e8950dfd56
commit
575ac76fa3
1 changed files with 1 additions and 1 deletions
2
kagi.el
2
kagi.el
|
@ -153,7 +153,7 @@ FastGPT with the following prompt:
|
||||||
(dolist (entry kagi--markup-to-face)
|
(dolist (entry kagi--markup-to-face)
|
||||||
(cl-destructuring-bind (start end face) entry
|
(cl-destructuring-bind (start end face) entry
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(let ((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)
|
(while (re-search-forward regexp nil t)
|
||||||
(let ((escaped-replacement (string-replace "\\" "\\\\" (match-string 1))))
|
(let ((escaped-replacement (string-replace "\\" "\\\\" (match-string 1))))
|
||||||
(replace-match (propertize escaped-replacement 'font-lock-face face) t nil)
|
(replace-match (propertize escaped-replacement 'font-lock-face face) t nil)
|
||||||
|
|
Loading…
Reference in a new issue