diff --git a/typegen/src/reformat.rs b/typegen/src/reformat.rs index 4bca75a..70f8d04 100644 --- a/typegen/src/reformat.rs +++ b/typegen/src/reformat.rs @@ -17,13 +17,13 @@ pub struct GfmQuoteBlocks { impl GfmQuoteBlocks { pub fn new() -> Self { Self { - callout_regex: Regex::new(r#">\s+\[!(?\w+)]\s+(?=\w)"#).unwrap() + callout_regex: Regex::new(r#">\s+\[!(?\w+)]\s+"#).unwrap() } } } impl ReformatPass for GfmQuoteBlocks { - fn reformat(&self, _: &Context, text: &mut String) { + fn reformat(&self, _: &Context, text: &mut String) { *text = text.replace("> [!INFO]", "> [!NOTE]"); *text = self.callout_regex.replace_all(text, "> [!$type]\n> ").to_string(); }