From cba961a2c81b2a80ea75f5f001a869a1b07f9f80 Mon Sep 17 00:00:00 2001 From: Bram Schoenmakers Date: Thu, 25 Jan 2024 10:14:11 +0100 Subject: [PATCH] Convert $italic$ to an italic face in FastGPT output --- kagi.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kagi.el b/kagi.el index 341e4c1..9c641a4 100644 --- a/kagi.el +++ b/kagi.el @@ -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 '(("" "" '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\":\"Test response in **bold**.\"}}" + "{\"data\":{\"output\":\"Test response in **bold** and $italic$.\"}}" "Stubbed response for the Kagi FastGPT endpoint.") (defvar kagi--summarizer-stubbed-response