From 2dff30140ff8b46b8b82b761b4305ceb7b67108d Mon Sep 17 00:00:00 2001 From: A Farzat Date: Sat, 7 Mar 2026 10:51:33 +0300 Subject: Replace format! macro with xml! where xml is used This commit does not produce a working version, as processed_fragment is escaped by xml!. This needs to be resolved. --- src/epub.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/epub.rs') diff --git a/src/epub.rs b/src/epub.rs index 1d4676d..f9a5aac 100644 --- a/src/epub.rs +++ b/src/epub.rs @@ -111,26 +111,13 @@ pub fn create_epub_archive( src_file.read_to_end(&mut buffer)?; if let Some(chapter) = chapters.get(&entry.ourn) { let chapter_dir = entry.full_path.parent().unwrap_or(RelativePath::new("")); - let stylesheet_links = chapter - .related_assets - .stylesheets - .iter() - .filter_map(|u| url_to_file.get(u)) - .map(|e| { - format!( - "\n", - e.media_type, - chapter_dir.relative(&e.full_path) - ) - }) - .collect::(); let html = String::from_utf8(buffer)?; let html = build_epub_chapter( epub_data, chapter, chapter_dir, &html, - &stylesheet_links, + &url_to_file, &url_path_to_local, )?; zip.write_all(html.as_bytes())?; -- cgit v1.2.3-70-g09d2