1
0
Fork 0

Convert $italic$ to an italic face in FastGPT output

This commit is contained in:
Bram Schoenmakers 2024-01-25 10:14:11 +01:00
parent cb8ac81db0
commit cba961a2c8
Signed by: bram
GPG key ID: 0CCD19DFDC63258F

View file

@ -154,6 +154,10 @@ same text will be charged.)"
"Face for bold parts in the Kagi output."
:group 'kagi)
(defface kagi-italic '((t :inherit italic))
"Face for italic parts in the Kagi output."
:group 'kagi)
(defface kagi-code '((t :inherit fixed-pitch))
"Face for code parts in the Kagi output."
:group 'kagi)
@ -171,6 +175,7 @@ same text will be charged.)"
(defconst kagi--markup-to-face
'(("<b>" "</b>" 'kagi-bold)
("**" "**" 'kagi-bold)
("$" "$" 'kagi-italic)
("```" "```" 'kagi-code))
"Contains a mapping from markup elements to faces.")
@ -232,7 +237,7 @@ https://help.kagi.com/kagi/api/fastgpt.html for more information."
"--data" "@-")))
(defvar kagi--fastgpt-stubbed-response
"{\"data\":{\"output\":\"<b>Test</b> response in **bold**.\"}}"
"{\"data\":{\"output\":\"<b>Test</b> response in **bold** and $italic$.\"}}"
"Stubbed response for the Kagi FastGPT endpoint.")
(defvar kagi--summarizer-stubbed-response