(targetPath: string)
| 197 | } |
| 198 | |
| 199 | function isAllowedHtmlSharePath(targetPath: string): boolean { |
| 200 | const roots = new Set<string>([process.cwd()]); |
| 201 | if (folderPath) roots.add(folderPath); |
| 202 | if (!/^https?:\/\//i.test(filePath)) roots.add(dirname(filePath)); |
| 203 | for (const root of roots) { |
| 204 | if (isWithinDirectory(targetPath, root)) return true; |
| 205 | } |
| 206 | return false; |
| 207 | } |
| 208 | |
| 209 | const singleFileSourceSaveEligible = mode === "annotate" && !sourceConverted && !(renderHtml && rawHtml) && !/^https?:\/\//i.test(filePath); |
| 210 | const initialSingleFileSourceSave = singleFileSourceSaveEligible |
no test coverage detected