[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/yaml cb1cc42bd1 093/124: Merge pull request #36 from zk
From: |
ELPA Syncer |
Subject: |
[elpa] externals/yaml cb1cc42bd1 093/124: Merge pull request #36 from zkry/fix-string-values-state-bug |
Date: |
Fri, 29 Nov 2024 16:00:06 -0500 (EST) |
branch: externals/yaml
commit cb1cc42bd13285cf2029b5a5dcd65e46e4e1f5af
Merge: c07cc6d0f3 e32ef2f5e5
Author: Zachary Romero <zacromero@posteo.net>
Commit: GitHub <noreply@github.com>
Merge pull request #36 from zkry/fix-string-values-state-bug
Fix string values state bug
---
yaml-tests.el | 6 +++++-
yaml.el | 10 +++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/yaml-tests.el b/yaml-tests.el
index 8b31e851b0..cd5155d537 100644
--- a/yaml-tests.el
+++ b/yaml-tests.el
@@ -386,7 +386,11 @@ ship-to:
" :object-type 'alist
:object-key-type 'string
- :string-values t))))
+ :string-values t)))
+ (should (equal (progn
+ (yaml-parse-string-with-pos "- # Empty\n- abc")
+ (yaml-parse-string "- # Empty\n- abc"))
+ [:null "abc"])))
(ert-deftest yaml-parsing-completes ()
diff --git a/yaml.el b/yaml.el
index 317b85050b..cfae27374d 100644
--- a/yaml.el
+++ b/yaml.el
@@ -1064,8 +1064,9 @@ then check EXPR at the current position."
((equal 'list sequence-type)
(setq yaml--parsing-sequence-type 'list))
(t (error "Invalid sequence-type. sequence-type must be list or array")))
- (when string-values
- (setq yaml--string-values t))))
+ (if string-values
+ (setq yaml--string-values t)
+ (setq yaml--string-values nil))))
(defun yaml-parse-string (string &rest args)
"Parse the YAML value in STRING. Keyword ARGS are as follows:
@@ -1114,7 +1115,10 @@ value. It defaults to the symbol :false."
res))
(defun yaml-parse-string-with-pos (string)
- "Parse the YAML value in STRING, storing positions as text properties."
+ "Parse the YAML value in STRING, storing positions as text properties.
+
+NOTE: This is an experimental feature and may experience API
+changes in the future."
(let ((yaml--parsing-store-position t))
(yaml-parse-string string
:object-type 'alist
- [elpa] externals/yaml 37a6b80ee3 121/124: Update declared version to match tag, (continued)
- [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, 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 <=
- [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
- [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