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
3 changed files with 17 additions and 3 deletions

4
Cargo.lock generated
View File

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

View File

@ -66,7 +66,7 @@ alphanumeric-sort = "1.5"
ansi-str = "0.8"
anyhow = "1.0.82"
base64 = "0.22.1"
bracoxide = "0.1.5"
bracoxide = "0.1.6"
brotli = "7.0"
byteorder = "1.5"
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]
fn test_examples() {
use crate::test_examples;