MCPcopy Create free account
hub / github.com/GCWing/BitFun / extract_meta_content

Function extract_meta_content

src/apps/desktop/src/api/skill_api.rs:1332–1337  ·  view source on GitHub ↗
(html: &str, key: &str)

Source from the content-addressed store, hash-verified

1330}
1331
1332fn extract_meta_content(html: &str, key: &str) -> Option<String> {
1333 let pattern = format!(r#"<meta name="{}" content="([^"]+)""#, regex::escape(key));
1334 let re = Regex::new(&pattern).ok()?;
1335 let caps = re.captures(html)?;
1336 Some(caps.get(1)?.as_str().to_string())
1337}
1338
1339fn normalize_html_text(raw: &str) -> String {
1340 let without_tags = if let Ok(re) = Regex::new(r"<[^>]+>") {

Callers 1

Calls 3

okMethod · 0.45
as_strMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected