[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tomelr 5959b90ffa 44/84: fix: Don't let TOML tables be
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tomelr 5959b90ffa 44/84: fix: Don't let TOML tables be recognized as TOML tables arrays |
Date: |
Tue, 3 May 2022 09:58:11 -0400 (EDT) |
branch: externals/tomelr
commit 5959b90ffa499281306473c83b669353ecb85073
Author: Kaushal Modi <kaushal.modi@gmail.com>
Commit: Kaushal Modi <kaushal.modi@gmail.com>
fix: Don't let TOML tables be recognized as TOML tables arrays
---
test/tinternal.el | 15 +++++++++++++++
tomelr.el | 3 ++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/test/tinternal.el b/test/tinternal.el
index b80950b434..5b4e1bb5d8 100644
--- a/test/tinternal.el
+++ b/test/tinternal.el
@@ -44,5 +44,20 @@
(dolist (el inp)
(should (equal nil (tomelr--toml-table-p el))))))
+;;;; tomelr--toml-table-array-p
+(ert-deftest test-internal-valid-tta ()
+ (let ((inp '(
+ (((a . 1)))
+ )))
+ (dolist (el inp)
+ (should (equal t (tomelr--toml-table-array-p el))))))
+
+(ert-deftest test-internal-invalid-tta ()
+ (let ((inp '(
+ ((a . 1)) ;This is a TOML table
+ )))
+ (dolist (el inp)
+ (should (equal nil (tomelr--toml-table-array-p el))))))
+
(provide 'tinternal)
diff --git a/tomelr.el b/tomelr.el
index c6ef0ba4f8..2c3ed32b74 100644
--- a/tomelr.el
+++ b/tomelr.el
@@ -378,7 +378,8 @@ Definition of a TOML Table Array (TTA):
- OBJECT is TTA if it is of type ((TT1) (TT2) ..) where each element is a
TOML Table (TT)."
- (when (and (not (stringp object))
+ (when (and (not (tomelr--toml-table-p object))
+ (not (stringp object))
(mapp object)) ;Because `mapp' is non-nil for strings too
(seq-every-p
(lambda (elem)
- [elpa] externals/tomelr 9c91e0dc07 18/84: test: Add test for float scalar key-value pairs, (continued)
- [elpa] externals/tomelr 9c91e0dc07 18/84: test: Add test for float scalar key-value pairs, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 96c890a68b 23/84: feat: Convert Lisp lists to TOML arrays, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr bb85106ee9 27/84: doc: Add spec for nested tables and arrays of tables, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 1d65064ffa 20/84: feat: Recognize local date format YYYY-MM-DD, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 2810504e84 32/84: feat: Add basic support for S-exp plists -> TOML conversion, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 0f4e7b4f2c 47/84: fix: Better detection of nested TTA, but still wip, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr cff1f8aa89 38/84: fix: Support TOML tables arrays specified as plist vector, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 4c419bcee2 37/84: fix: Support TOML tables specified as plists, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr baf81228bc 45/84: fix: Correct the spec for nested array of tables, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 4dda8e6be3 46/84: chore: Style edits in a test, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 5959b90ffa 44/84: fix: Don't let TOML tables be recognized as TOML tables arrays,
ELPA Syncer <=
- [elpa] externals/tomelr b64eb07e99 49/84: fix: Detect TT with sub-tables correctly, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 4386d99a85 65/84: refactor(minor): Use `tomelr--toml-table-p`, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 26f1fc2f3c 55/84: doc: Update the medley example, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr e2b313ca3b 52/84: feat: Implement everything planned in the initial spec, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 4434ccc64b 70/84: chore: Bump version, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 10a1994aed 51/84: feat: Support (lightly tested) nested TOML Table Arrays, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr df0e73334f 59/84: Revert "doc: Update the medley example", ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr ec381fd723 79/84: fix: Auto-stringify and auto-quote symbol values, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a25d952a17 77/84: feat: Auto-coerce string to integers, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr b2ba4c46b5 82/84: refactor: Minor code reorg, ELPA Syncer, 2022/05/03