[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ellama acb2a351dd 09/11: Fix code trimming
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ellama acb2a351dd 09/11: Fix code trimming |
Date: |
Fri, 22 Dec 2023 15:57:51 -0500 (EST) |
branch: externals/ellama
commit acb2a351dd6740bd6de83a6a2200346eaa20a549
Author: Steven Allen <steven@stebalien.com>
Commit: Steven Allen <steven@stebalien.com>
Fix code trimming
Unfortunately, we need to trim the left side before the right.
The default `string-trim` behavior is to trim the right before the left,
which deletes the code.
---
ellama.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ellama.el b/ellama.el
index 7b6e120318..9589e89ddb 100644
--- a/ellama.el
+++ b/ellama.el
@@ -119,7 +119,8 @@
(defun ellama--code-filter (text)
"Filter code prefix/suffix from TEXT."
- (string-trim text ellama--code-prefix ellama--code-suffix))
+ ;; Trim left first as `string-trim' trims from the right and ends up
deleting all the code.
+ (string-trim-right (string-trim-left text ellama--code-prefix)
ellama--code-suffix))
(defun ellama-setup-keymap ()
"Set up the Ellama keymap and bindings."
- [elpa] externals/ellama updated (a0aba01fa1 -> cb0fbac035), ELPA Syncer, 2023/12/22
- [elpa] externals/ellama 0463fd4d99 02/11: Document new ellama-stream parameters, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama b1ede862bb 03/11: Fix documentation text width, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama 01bcadadf9 04/11: Fix additional lint errors, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama 2d982274cb 05/11: Pass complete response to on-done function, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama c8bf280bc9 06/11: Improve ellama-stream doc string a bit, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama c97c4a8096 01/11: Merge duplicate code, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama 510cc0a2ce 07/11: Merge pull request #29 from Stebalien/steb/dry, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama b2082aca99 08/11: Eliminate duplicated code, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama acb2a351dd 09/11: Fix code trimming,
ELPA Syncer <=
- [elpa] externals/ellama 37696f7029 10/11: Merge pull request #34 from Stebalien/steb/fix-trim, ELPA Syncer, 2023/12/22
- [elpa] externals/ellama cb0fbac035 11/11: Update version, ELPA Syncer, 2023/12/22