docx-validate
    Preparing search index...

    Function canonicalPartName

    • Canonical comparison form of a part name (issue #297): both an Override PartName and a package part path reduce to the same key, so two distinct names can never collapse into one. Escapes of unreserved characters decode (%7e and ~ are the same name); escapes of everything else stay escaped (%40 and @ stay distinct, because RFC 3986 only equates an escaped character with its literal when the character is unreserved); characters outside pchar// — spaces, a lone %, non-ASCII — encode as UTF-8 percent-escapes; the escape hex is uppercased; and the whole key compares ASCII case-insensitively, as OPC part-name equivalence demands.

      Parameters

      • partName: string

      Returns string