Numbers proceeded with the escape character ignored fix (#15684)

Fixes #15675

I've added relevant test cases to ensure coverage of the identified bug.
The issue originated from my crate and pertains to the bracoxide
dependency—a bug I’ve internally referred to as IgnorantNumbers. I’ve
submitted a fix and updated the bracoxide dependency accordingly.
This commit is contained in:
A. Taha Baki 2025-05-03 16:10:51 +03:00 committed by GitHub
parent acc152564c
commit 63e68934f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 3 deletions

4
Cargo.lock generated
View File

@ -761,9 +761,9 @@ dependencies = [
[[package]] [[package]]
name = "bracoxide" name = "bracoxide"
version = "0.1.5" version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f52991c481aa9d7518254cfb6ce5726d24ff8c5d383d6422cd3793729b0962a" checksum = "3572b24445a122332bb25a2637248d62ca8b567351d98b1194ca4132c61810bd"
[[package]] [[package]]
name = "brotli" name = "brotli"

View File

@ -66,7 +66,7 @@ alphanumeric-sort = "1.5"
ansi-str = "0.8" ansi-str = "0.8"
anyhow = "1.0.82" anyhow = "1.0.82"
base64 = "0.22.1" base64 = "0.22.1"
bracoxide = "0.1.5" bracoxide = "0.1.6"
brotli = "7.0" brotli = "7.0"
byteorder = "1.5" byteorder = "1.5"
bytes = "1" bytes = "1"

View File

@ -376,6 +376,20 @@ mod tests {
); );
} }
#[test]
fn test_numbers_proceeding_escape_char_not_ignored() {
assert_eq!(
str_expand("1\\\\{a,b}", Span::test_data(), Span::test_data()),
Value::list(
vec![
Value::string(String::from("1\\a"), Span::test_data(),),
Value::string(String::from("1\\b"), Span::test_data(),)
],
Span::test_data(),
)
);
}
#[test] #[test]
fn test_examples() { fn test_examples() {
use crate::test_examples; use crate::test_examples;