[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/yaml 25f35c80e4 035/124: Replace string-trim-right with
From: |
ELPA Syncer |
Subject: |
[elpa] externals/yaml 25f35c80e4 035/124: Replace string-trim-right with replace-regexp-in-string |
Date: |
Fri, 29 Nov 2024 15:59:57 -0500 (EST) |
branch: externals/yaml
commit 25f35c80e439cf157ecd829010c783a5e2c839e0
Author: Zachary Romero <zacromero@posteo.net>
Commit: Zachary Romero <zacromero@posteo.net>
Replace string-trim-right with replace-regexp-in-string
---
yaml.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/yaml.el b/yaml.el
index ac6f84a56c..4f1c642f29 100644
--- a/yaml.el
+++ b/yaml.el
@@ -214,8 +214,8 @@ This flag is intended for development purposes.")
(defun yaml--chomp-text (text-body chomp)
"Change the ending newline of TEXT-BODY based on CHOMP."
- (cond ((eq :clip chomp) (concat (string-trim-right text-body "\n*") "\n"))
- ((eq :strip chomp) (string-trim-right text-body "\n*"))
+ (cond ((eq :clip chomp) (concat (replace-regexp-in-string "\n*$" ""
text-body) "\n"))
+ ((eq :strip chomp) (replace-regexp-in-string "\n*$" "" text-body))
((eq :keep chomp) text-body)))
(defun yaml--process-folded-text (text)
@@ -398,7 +398,7 @@ This flag is intended for development purposes.")
(let ((comment-text (pop yaml--object-stack)))
(unless (stringp value)
(error "Trail-comments can't be nested under non-string"))
- (yaml--scalar-event style (string-trim-right value (concat
(regexp-quote comment-text) "\n*$"))))
+ (yaml--scalar-event style (replace-regexp-in-string (concat
(regexp-quote comment-text) "\n*$") "" value )))
(pop yaml--state-stack))
((equal top-state nil))))
'(:scalar))
@@ -485,7 +485,7 @@ This flag is intended for development purposes.")
(string-match "\\(^\\|\n\\)...$"
text))
;; Hack to not send the document
parse end.
;; Will only occur with bare ns-plain
at top level.
- (string-trim-right (string-trim-right
text "...") "\n")
+ (replace-regexp-in-string
"\\(^\\|\n\\)...$" "" text)
text))
(replaced (replace-regexp-in-string
"\\(?:[ \t]*\r?\n[ \t]*\\)"
@@ -577,7 +577,7 @@ This flag is intended for development purposes.")
(when (equal (car yaml--state-stack) :trail-comments)
(pop yaml--state-stack)
(let ((comment-text (pop yaml--object-stack)))
- (setq text (string-trim-right text (concat
(regexp-quote comment-text) "\n*$")))))
+ (setq text (replace-regexp-in-string (concat
(regexp-quote comment-text) "\n*$") "" text))))
(let* ((processed-text (yaml--process-folded-text text)))
(yaml--scalar-event "folded" processed-text))))
("e-scalar" . (lambda (text)
- [elpa] externals/yaml 7c4b2ec9a5 116/124: Merge pull request #49 from zkry/48-encode-remove-leading-newlines, (continued)
- [elpa] externals/yaml 7c4b2ec9a5 116/124: Merge pull request #49 from zkry/48-encode-remove-leading-newlines, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 708dd886a2 001/124: Initial commit, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 8771e68930 004/124: Got key-value working, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml afdb23754a 024/124: Fix folding string parsing, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 2e2e7d199e 023/124: Implement anchor alias resolution, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 8101f2c1fa 030/124: Add import statement; remove debug messages, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 84b88c9ed1 073/124: Merge pull request #27 from zkry/fix-empty-single-quote-string, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml b6091cc080 077/124: add unit test case, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml cb1cc42bd1 093/124: Merge pull request #36 from zkry/fix-string-values-state-bug, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 39f8412bec 079/124: Fix encoding deeply nested lists, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 25f35c80e4 035/124: Replace string-trim-right with replace-regexp-in-string,
ELPA Syncer <=
- [elpa] externals/yaml 1304802f9f 069/124: Reduce the max line length to be under 80 characters., ELPA Syncer, 2024/11/29
- [elpa] externals/yaml f8803066ae 085/124: Merge pull request #33 from zkry/add-position-information-to-parse-tree, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 7ef2e8ce5b 100/124: fix unit tests, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 368452c534 064/124: Add test case for issue, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml d82bfb523e 059/124: fix testcases, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml af49540f53 107/124: Use cl-defun &key to allow eldoc argument hints to work better, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 01a12f2345 118/124: Merge pull request #50 from rdrg109/master, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml fe08b8f530 120/124: Merge pull request #52 from zkry/51-fix-failing-test, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml a19fbf948a 112/124: Merge pull request #46 from zkry/45-fix-char-escape, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 7f09102db0 115/124: Remove leading new-lines for yaml-encode, ELPA Syncer, 2024/11/29