* For a given XML file path, find its corresponding .rels file path. * E.g., "ppt/slides/slide1.xml" → "ppt/slides/_rels/slide1.xml.rels"
(filePath: string)
| 43 | * E.g., "ppt/slides/slide1.xml" → "ppt/slides/_rels/slide1.xml.rels" |
| 44 | */ |
| 45 | function relsPathFor(filePath: string): string { |
| 46 | const dir = basePath(filePath) |
| 47 | const fileName = filePath.substring(filePath.lastIndexOf('/') + 1) |
| 48 | return `${dir}/_rels/${fileName}.rels` |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Detect WPS (Kingsoft Office / WPS Office) by checking for known markers |
no test coverage detected