[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/yaml 20202d7c39 123/124: Merge pull request #56 from zk
From: |
ELPA Syncer |
Subject: |
[elpa] externals/yaml 20202d7c39 123/124: Merge pull request #56 from zkry/fix-octal-hex-parsing |
Date: |
Fri, 29 Nov 2024 16:00:12 -0500 (EST) |
branch: externals/yaml
commit 20202d7c39f395533bf29ce884a52035916e81d0
Merge: 37a6b80ee3 5af0cd7c55
Author: Zachary Romero <zacromero@posteo.net>
Commit: GitHub <noreply@github.com>
Merge pull request #56 from zkry/fix-octal-hex-parsing
Fix octal/hex parsing (#54)
---
yaml-tests.el | 6 +++++-
yaml.el | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/yaml-tests.el b/yaml-tests.el
index acf56e5176..bfa70f3ac7 100644
--- a/yaml-tests.el
+++ b/yaml-tests.el
@@ -419,7 +419,11 @@ ship-to:
"this is text"))
(should (equal (yaml-parse-string "top: |1\n this is text"
:object-type 'alist)
- '((top . " this is text\n")))))
+ '((top . " this is text\n"))))
+ (should (equal (yaml-parse-string "top: 0x10" :object-type 'alist)
+ '((top . 16))))
+ (should (equal (yaml-parse-string "top: 0o10" :object-type 'alist)
+ '((top . 8)))))
(ert-deftest yaml-parsing-completes ()
"Tests that the yaml parses."
diff --git a/yaml.el b/yaml.el
index 4b450434d6..bfa93cbdb0 100644
--- a/yaml.el
+++ b/yaml.el
@@ -305,9 +305,9 @@ This flag is intended for development purposes.")
((string-match "^[-+]?[0-9]+$" scalar)
(string-to-number scalar))
((string-match "^0o[0-7]+$" scalar)
- (string-to-number scalar 8))
+ (string-to-number (substring scalar 2) 8))
((string-match "^0x[0-9a-fA-F]+$" scalar)
- (string-to-number scalar 16))
+ (string-to-number (substring scalar 2) 16))
;; tag:yaml.org,2002:float
((string-match
"^[-+]?\\(\\.[0-9]+\\|[0-9]+\\(\\.[0-9]*\\)?\\)\\([eE][-+]?[0-9]+\\)?$"
- [elpa] externals/yaml 01ab8d1910 078/124: Merge pull request #30 from zkry/29-fix-list-encoding-indentation, (continued)
- [elpa] externals/yaml 01ab8d1910 078/124: Merge pull request #30 from zkry/29-fix-list-encoding-indentation, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 9382bf5a3b 070/124: Merge pull request #25 from zkry/fix-lines-longer-than-80, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 34c300b085 075/124: Merge pull request #28 from tarsiiformes/nil, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 7f055d207c 057/124: Merge pull request #17 from conao3/plist-keyword, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml b0d95e7e81 066/124: Use `alist-get` to converting alist to hash table, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml c3988d10e2 098/124: store current indent level and use that for basis of block indent, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 94ea32ecb7 103/124: version bump, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml ee34639c96 105/124: Update docstring and README to match current behavior, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 12655d58ef 113/124: Fix typos, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml b72c188381 111/124: Fix character escape code, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 20202d7c39 123/124: Merge pull request #56 from zkry/fix-octal-hex-parsing,
ELPA Syncer <=
- [elpa] externals/yaml 3506009f94 031/124: Fix yaml-process-literal-text-test, ELPA Syncer, 2024/11/29