branch: externals/ellama
commit 6167833f8a6be74a42c7e903f4518ac8684d7c41
Author: Sergey Kostyaev <sskosty...@gmail.com>
Commit: Sergey Kostyaev <sskosty...@gmail.com>

    Fix think tag handling
    
    Adjusted the regex for closing </think> tag to ensure proper handling
    of optional newline characters, ensuring consistent markdown to org
    conversion.
---
 ellama.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ellama.el b/ellama.el
index f47d556207..dba16b9146 100644
--- a/ellama.el
+++ b/ellama.el
@@ -644,7 +644,7 @@ This filter contains only subset of markdown syntax to be 
good enough."
     (replace-regexp-in-string "^[[:space:]]*```" "#+END_SRC\n")
     (replace-regexp-in-string "```" "\n#+END_SRC\n")
     (replace-regexp-in-string "<think>[\n]?" "#+BEGIN_QUOTE\n")
-    (replace-regexp-in-string "</think>[\n]?" "#+END_QUOTE\n")
+    (replace-regexp-in-string "[\n]?</think>[\n]?" "\n#+END_QUOTE\n")
     (ellama--replace-bad-code-blocks)
     (ellama--replace-outside-of-code-blocks)))
 

Reply via email to