[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/yaml 84b88c9ed1 073/124: Merge pull request #27 from zk
From: |
ELPA Syncer |
Subject: |
[elpa] externals/yaml 84b88c9ed1 073/124: Merge pull request #27 from zkry/fix-empty-single-quote-string |
Date: |
Fri, 29 Nov 2024 16:00:03 -0500 (EST) |
branch: externals/yaml
commit 84b88c9ed178af16da18b230c1f61c57cefedf28
Merge: 69c699a15a a2ed8f1fd6
Author: Zachary Romero <zacromero@posteo.net>
Commit: GitHub <noreply@github.com>
Merge pull request #27 from zkry/fix-empty-single-quote-string
Fix empty single quote string bug
---
yaml-tests.el | 5 ++++-
yaml.el | 16 +++++++++-------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/yaml-tests.el b/yaml-tests.el
index 928d18638b..7a3aae569e 100644
--- a/yaml-tests.el
+++ b/yaml-tests.el
@@ -341,7 +341,10 @@ key-2: |2-
:object-key-type 'string
:object-type 'alist)
'(("key-1" . " ---\n ---")
- ("key-2" . " ---\n ---")))))
+ ("key-2" . " ---\n ---"))))
+ (should (equal (yaml-parse-string "''") ""))
+ (should (equal (yaml-parse-string "foo: ''" :object-type 'alist)
+ '((foo . "")))))
(ert-deftest yaml-parsing-completes ()
diff --git a/yaml.el b/yaml.el
index f7c7ee02b2..5a21f28cb3 100644
--- a/yaml.el
+++ b/yaml.el
@@ -581,13 +581,15 @@ reverse order."
(substring x 1)
" "))
replaced))
- (replaced (replace-regexp-in-string
- "''"
- (lambda (x)
- (if (> (length x) 1)
- (substring x 1)
- "'"))
- replaced)))
+ (replaced (if (not (equal "''" replaced))
+ (replace-regexp-in-string
+ "''"
+ (lambda (x)
+ (if (> (length x) 1)
+ (substring x 1)
+ "'"))
+ replaced)
+ replaced)))
(yaml--scalar-event "single"
(substring replaced 1 (1- (length replaced)))))))
("c-double-quoted" .
- [elpa] externals/yaml 3381a5d2f7 109/124: Merge pull request #43 from kisaragi-hiu/fix/regexp-missing-escape, (continued)
- [elpa] externals/yaml 3381a5d2f7 109/124: Merge pull request #43 from kisaragi-hiu/fix/regexp-missing-escape, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 70c4fcead9 124/124: bump version, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 37a6b80ee3 121/124: Update declared version to match tag, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 604774d385 117/124: Add documentation on running tests, ELPA Syncer, 2024/11/29
- [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 <=
- [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, 2024/11/29
- [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