mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 15:49:02 +08:00
fix(html-transformer): preserve title tag
This commit is contained in:
parent
61d7ba76f7
commit
8af4e4b8dd
@ -128,7 +128,9 @@ pub unsafe extern "C" fn extract_metadata(html: *const libc::c_char) -> *mut i8
|
||||
if let Some(v) = out.get(name) {
|
||||
match v {
|
||||
Value::String(_) => {
|
||||
out.insert(name.to_string(), Value::Array(vec! [v.clone(), Value::String(content.to_string())]));
|
||||
if name != "title" { // preserve title tag in metadata
|
||||
out.insert(name.to_string(), Value::Array(vec! [v.clone(), Value::String(content.to_string())]));
|
||||
}
|
||||
},
|
||||
Value::Array(_) => {
|
||||
match out.get_mut(name) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user