diff --git a/README.md b/README.md index 57fbee33..61d903f7 100644 --- a/README.md +++ b/README.md @@ -63,26 +63,26 @@ So its value looks like this: Of course, in some scenarios, for the convenience of operation, an API that converts to a JSON type value is also provided: -```json +```ts [ - "div", // node name + 'div', // node name // All attributes of the node { - "data-element": "root", - "contenteditable": "true" + 'data-element': 'root', + contenteditable: 'true', }, // child node 1 [ // child node name - "p", + 'p', // Child node attributes {}, // child node of byte point - "Hello world!" + 'Hello world!', ], // child node 2 - ["p", {}, ["br", {}]] -] + ['p', {}, ['br', {}]], +]; ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index 42bb5932..2a6e0259 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -63,26 +63,26 @@ 当然,有些场景下为了方便操作,也提供了转换为 JSON 类型值的 API: -```json +```ts [ - "div", // 节点名称 + 'div', // 节点名称 // 节点所有的属性 { - "data-element": "root", - "contenteditable": "true" + 'data-element': 'root', + contenteditable: 'true', }, // 子节点1 [ // 子节点名称 - "p", + 'p', // 子节点属性 {}, // 字节点的子节点 - "Hello world!" + 'Hello world!', ], // 子节点2 - ["p", {}, ["br", {}]] -] + ['p', {}, ['br', {}]], +]; ```