Skip to content

Commit 7c04d34

Browse files
committed
Merge branch 'main' into Jeffrey-Luszcz-patch-1
2 parents 988bcb6 + 239a651 commit 7c04d34

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

mdbook-asciinema/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,9 @@ impl Placeholder {
183183
}
184184

185185
fn render(&self, from_path: &Path) -> Result<String> {
186-
static ELEMENT_ID: LazyLock<regex::Regex> = LazyLock::new(|| {
187-
regex::Regex::new(r#"^[A-Za-z][\w\-:.]*"#)
188-
.unwrap()
189-
});
190-
186+
static ELEMENT_ID: LazyLock<regex::Regex> =
187+
LazyLock::new(|| regex::Regex::new(r#"^[A-Za-z][\w\-:.]*"#).unwrap());
188+
191189
match self.placeholder_type {
192190
// omit the escape char
193191
PlaceholderType::Escaped => Ok(self.placeholder_text[1..].to_owned()),
@@ -203,7 +201,9 @@ impl Placeholder {
203201
.collect::<String>()
204202
);
205203

206-
if let Some(value) = props.get("id") && ELEMENT_ID.is_match(value) {
204+
if let Some(value) = props.get("id")
205+
&& ELEMENT_ID.is_match(value)
206+
{
207207
element_id = value.clone()
208208
}
209209

0 commit comments

Comments
 (0)