Skip to content

Commit d492f49

Browse files
committed
refactor: ♻️ Image, link and embed attribute url change to respective attribute name
1 parent 555d36e commit d492f49

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/options/default-node-options.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ export const defaultNodeOption: RenderOption = {
1212
return `<p>${next(node.children)}</p>`
1313
},
1414
[NodeType.LINK]:(node: Node, next: Next) => {
15-
return `<a href="${node.attrs.url}">${next(node.children)}</a>`
15+
return `<a href="${node.attrs.href}">${next(node.children)}</a>`
1616
},
1717
[NodeType.IMAGE]:(node: Node, next: Next) => {
18-
return `<img src="${node.attrs.url}" />${next(node.children)}`
18+
return `<img src="${node.attrs.src}" />${next(node.children)}`
1919
},
2020
[NodeType.EMBED]:(node: Node, next: Next) => {
21-
return `<iframe src="${node.attrs.url}">${next(node.children)}</iframe>`
21+
return `<iframe src="${node.attrs.src}">${next(node.children)}</iframe>`
2222
},
2323
[NodeType.HEADING_1]:(node: Node, next: Next) => {
2424
return `<h1>${next(node.children)}</h1>`

0 commit comments

Comments
 (0)