docx-validate
    Preparing search index...

    Function resolveTarget

    • Resolve one relationship target against the folder of its source part, as the rest of the codebase does (\ reads as /, a query or fragment is dropped, dot segments resolve, a package-absolute target's below its leading / too, which it keeps (#947); an empty segment collapses, and a final . or .. segment leaves a folder, as {@link relationshipTargetPartName} says (session 70, #962)), then take the OPC-equivalent stored entry (canonicalPartName comparison); undefined when it names no stored part, resolves to the package root (#970), or names a folder (#962). A climb past the package root stops there, as {@link relationshipTargetPartName} says, so word/'s ../../comments.xml names /comments.xml (sessions 63, 64 and 74 to 78; #830, #986).

      Parameters

      • lookup: (partName: string) => string | undefined
      • baseDir: string
      • target: string

      Returns string | undefined