fn format_line(&self, num: &str, content: &str, padding: usize) -> String {
        let num = style(format!("{num:>padding$}: ")).dim();

        // Format the content with highlighting if regex is available
        let line = match self.regex {
            Some(ref regex) => regex.find(content).map_or_else(
                || content.to_string(),
                |mat| {
                    format!(
                        "{}{}{}",
                        &content[..mat.start()],
                        style(&content[mat.start()..mat.end()]).yellow().bold(),
                        &content[mat.end()..]
                    )
                },
            ),
            None => content.to_string(),
        };

        format!("{num}{line}\n")
    }
Format a single line with colorization and consistent padding
crates/forge_display/src/grep.rs