Skip to content

Commit 3e3faaf

Browse files
authored
fix(xml): add missing 's' to '#instructions' in clone/doc (#102)
1 parent 2969d11 commit 3e3faaf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

xml/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export type options = {
8282
* - `readonly ["#text"]?: string`: concatenated children text content, this property becomes enumerable if at least one non-empty text node is present
8383
* - XML document properties
8484
* - `["#doctype"]?: xml_node`: XML doctype
85-
* - `["#instruction"]?: { [key:string]: xml_node| Array<xml_node> }`: XML processing instructions
85+
* - `["#instructions"]?: { [key:string]: xml_node| Array<xml_node> }`: XML processing instructions
8686
*
8787
* Attributes are prefixed with an arobase (`@`).
8888
*

xml/stringify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function clone(document: Record<PropertyKey, unknown>) {
112112
for (const property in document) {
113113
cloned[property] = ((document[property] !== null) && (["object", "function"].includes(typeof document[property]))) ? clone(document[property] as Record<PropertyKey, unknown>) : document[property]
114114
}
115-
;["~name", "~parent", "#text", "~children", "#comments", "#text", "#doctype", "#instruction", internal].forEach((property) => {
115+
;["~name", "~parent", "#text", "~children", "#comments", "#text", "#doctype", "#instructions", internal].forEach((property) => {
116116
if (property in document) {
117117
Object.defineProperty(cloned, property, Object.getOwnPropertyDescriptor(document, property)!)
118118
}

0 commit comments

Comments
 (0)