mirror of
https://github.com/storytold/deckcraft.git
synced 2026-11-13 13:43:50 +00:00
fix(pptx): simplify sidecar part predicate
This commit is contained in:
1 parent
c7fb94b974
commit
17223d0919
1 file changed
+1
-4
@@ -251,10 +251,7 @@ pub fn sidecar_part(name: &str) -> bool {
|
||||
let file = segs.last().copied().unwrap_or("");
|
||||
let stem = file.strip_prefix("chart").unwrap_or("");
|
||||
let num = stem.strip_suffix(".xml.rels").or_else(|| stem.strip_suffix(".xml")).unwrap_or("");
|
||||
if stem != file && !num.is_empty() && num.chars().all(|c| c.is_ascii_digit()) {
|
||||
return false;
|
||||
}
|
||||
true
|
||||
!(stem != file && !num.is_empty() && num.chars().all(|c| c.is_ascii_digit()))
|
||||
}
|
||||
|
||||
pub fn dir_of(part: &str) -> String {
|
||||
|
||||
Reference in new issue
Block a user