Skip to content

Commit 7450502

Browse files
committed
test: fix glyph id
1 parent 64136a6 commit 7450502

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

markdown-renderer/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ mod test {
271271
let mut counter = 0;
272272

273273
// Replace all glyph IDs with normalized ones
274-
let id_regex = regex::Regex::new(r#"(id|xlink:href)="(#?)g[A-F0-9]{32}""#).unwrap();
274+
// IDs can have variable length hex strings (typically 31-32 chars)
275+
let id_regex = regex::Regex::new(r#"(id|xlink:href)="(#?)g[A-F0-9]+""#).unwrap();
275276

276277
id_regex
277278
.replace_all(html, |caps: &regex::Captures| {

0 commit comments

Comments
 (0)