pub fn extract_tag_content<'a>(text: &'a str, tag_name: &str) -> Option<&'a str> {
    let opening_tag = format!("<{tag_name}>",);
    let closing_tag = format!("</{tag_name}>");

    #[allow(clippy::collapsible_if)]
    if let Some(start_idx) = text.find(&opening_tag) {
        if let Some(end_idx) = text.rfind(&closing_tag) {
            let content_start = start_idx + opening_tag.len();
            if content_start < end_idx {
                return Some(text[content_start..end_idx].trim());
            }
        }
    }

    None
}
Extracts content between the specified XML-style tags

# Arguments

* `text` - The text to extract content from
* `tag_name` - The name of the XML tag (without angle brackets)

# Returns

* `Some(&str)` containing the extracted content if tags are found
* `None` if the tags are not found
crates/forge_domain/src/xml.rs