Determine required files from custom HTML

This commit is contained in:
Christoph Hagen
2025-07-12 09:22:33 +02:00
parent ba6097a67b
commit 43b761b593
5 changed files with 53 additions and 7 deletions

View File

@@ -156,15 +156,18 @@ struct HtmlCommand: CommandProcessor {
return
}
if findFile(withAbsolutePath: path) {
// File marked as required
return
}
let fileId = path.dropBeforeLast("/")
if content.isValidIdForFile(fileId) {
results.missing(file: fileId, source: "HTML: \(source)")
} else {
results.warning("Could not find file '\(path)' for \(source)")
}
results.requiredOutput(path.withLeadingSlashRemoved, source: "HTML: \(source)")
// let fileId = path.dropBeforeLast("/")
// if content.isValidIdForFile(fileId) {
// results.missing(file: fileId, source: "HTML: \(source)")
// } else {
// results.warning("Could not find file '\(path)' for \(source)")
// }
}
private func findFile(withAbsolutePath absolutePath: String) -> Bool {