[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/yaml 5af0cd7c55 122/124: Fix octal/hex parsing (#54)
From: |
ELPA Syncer |
Subject: |
[elpa] externals/yaml 5af0cd7c55 122/124: Fix octal/hex parsing (#54) |
Date: |
Fri, 29 Nov 2024 16:00:11 -0500 (EST) |
branch: externals/yaml
commit 5af0cd7c553c2ec93b35d81a7759224c9bd68fae
Author: Zachary Romero <zacromero@posteo.net>
Commit: Zachary Romero <zacromero@posteo.net>
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 69c699a15a 071/124: Minor code formatting fixes, (continued)
- [elpa] externals/yaml 69c699a15a 071/124: Minor code formatting fixes, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 1f15c0b33a 062/124: Merge pull request #20 from j-shilling/fix-encoding-symbols, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml adb3e52a21 081/124: Merge pull request #32 from zkry/fix-encoding-deeply-nested-lists, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 2500074ebf 097/124: Merge pull request #39 from zkry/fix-obob-for-storing-position, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml f9fbe392e3 065/124: Merge pull request #22 from zkry/fix-escape-char-literals, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml fdc65922c9 099/124: fix zero-column indent problems; add more unit tests, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml c81f87f0fd 080/124: fix unit test, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 7783d802b0 102/124: Don't remove all properties, just yaml-n, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 73fde9d8fb 110/124: Merge pull request #44 from kisaragi-hiu/eldoc-hints, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml e787dd06c6 106/124: Merge pull request #42 from kisaragi-hiu/bring-docstring-up-to-date, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 5af0cd7c55 122/124: Fix octal/hex parsing (#54),
ELPA Syncer <=
- [elpa] externals/yaml 4a3243a2be 108/124: yaml--the-end: fix incorrect regexp, ELPA Syncer, 2024/11/29
- [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