[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tomelr c2d1328c44 80/84: fix: Boolean coercing when val
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tomelr c2d1328c44 80/84: fix: Boolean coercing when value is a symbol true or false |
Date: |
Tue, 3 May 2022 09:58:16 -0400 (EDT) |
branch: externals/tomelr
commit c2d1328c4404e6af920dc431ba57ee00eef4ba36
Author: Kaushal Modi <kaushal.modi@gmail.com>
Commit: Kaushal Modi <kaushal.modi@gmail.com>
fix: Boolean coercing when value is a symbol true or false
---
test/tcoerce.el | 4 ++++
tomelr.el | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/tcoerce.el b/test/tcoerce.el
index 975f8625b8..9b5295adef 100644
--- a/test/tcoerce.el
+++ b/test/tcoerce.el
@@ -30,10 +30,12 @@
(inp '(
((key1 . "true"))
((key2 . "false"))
+ ((key3 . (false true)))
))
(ref '(
"key1 = true"
"key2 = false"
+ "key3 = [false, true]"
))
out)
(dolist (el inp)
@@ -45,10 +47,12 @@
(inp '(
((key1 . "true"))
((key2 . "false"))
+ ((key3 . (false true)))
))
(ref '(
"key1 = \"true\""
"key2 = \"false\""
+ "key3 = [\"false\", \"true\"]"
))
out)
(dolist (el inp)
diff --git a/tomelr.el b/tomelr.el
index 5f768c13d9..1bd2de3ead 100644
--- a/tomelr.el
+++ b/tomelr.el
@@ -129,12 +129,12 @@ Return nil if OBJECT is not recognized as a TOML boolean."
(prog1 (setq object (cond ((or
(eq object t)
(and (member 'boolean tomelr-coerce-to-types)
- (equal object "true")))
+ (member object '("true" true))))
"true")
((or
(member object tomelr-false)
(and (member 'boolean tomelr-coerce-to-types)
- (equal object "false")))
+ (member object '("false" false))))
"false")))
(and object (insert object))))
- [elpa] externals/tomelr 192cb06a23 57/84: chore(style): Whitespace change only, (continued)
- [elpa] externals/tomelr 192cb06a23 57/84: chore(style): Whitespace change only, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 6d2be83669 69/84: chore: package-lint fixes, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 41ccea4ebe 64/84: refactor: Remove unnecessary tomelr-encode-keyword, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 406f4922a8 58/84: test: Add tests for json.el functions used in tomelr, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr b3b6a28d15 68/84: doc: Add more examples, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr f9d670e165 56/84: refactor: Clean up unused code, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 511240765b 71/84: chore: Ignore .elc files, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr ed13b73e9b 74/84: feat: Support string keys, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr de661716af 72/84: style: Remove space from after and before [ and ] brackets, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 334b7cba54 76/84: refactor: Don't attempt to triple-quote TOML keys, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr c2d1328c44 80/84: fix: Boolean coercing when value is a symbol true or false,
ELPA Syncer <=
- [elpa] externals/tomelr ebe5959174 75/84: feat: Auto-coerce string to boolean, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a676192b43 81/84: fix: Integer coercing of a number strings with underscores, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 8da825067b 15/84: chore(readme): Update, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 65653d53ee 30/84: chore(doc): M-x checkdoc fixes, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr bcaea16ec0 39/84: chore(doc): Clean up old code block, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 45542fb234 67/84: chore: Bump version, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 7c004af90d 66/84: style: Remove unnecessary tomelr-encode-* functions, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 568de5efb2 83/84: chore: Bump version, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 0d4674f782 42/84: test: Test `tomelr--toml-table-p`, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 0eb4fa04ac 43/84: fix: Don't let array of TOML tables be recognized as TOML tables, ELPA Syncer, 2022/05/03