need to change the way page_count is made in presentations

This commit is contained in:
Chris Cochrun 2023-05-16 13:27:53 -05:00
parent b234795a36
commit 8af7c9bb6d
2 changed files with 7 additions and 4 deletions

View file

@ -190,8 +190,8 @@ mod presentation_model {
// println!("{:?}", db);
let mut actual_page_count = new_page_count;
if presentation_html {
let actual_path = presentation_path.clone().to_string().trim();
actual_page_count = reveal_js::count_slides_and_fragments(actual_path);
let actual_path = presentation_path.clone().to_string();
actual_page_count = reveal_js::count_slides_and_fragments(actual_path.trim());
}
let presentation = self::Presentation {

View file

@ -28,6 +28,10 @@ pub fn count_slides_and_fragments(html_file_path: &str) -> i32 {
}
let total = num_slides + num_fragments;
println!(
"SLIDE_NUMBERS: {:?}, {:?}, {:?}",
num_slides, num_fragments, total
);
total as i32
}
@ -37,5 +41,4 @@ pub fn count_slides_and_fragments(html_file_path: &str) -> i32 {
// let presentation = count_slides_and_fragments(html_file_path);
// println!("Total number of slides: {}", presentation.num_slides);
// println!("Total number of fragments: {}", presentation.num_fragments);
// }
// println!("Total number of fragments: {}", presentation