Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 41b04df

Browse files
author
Svetlana Malakhova
authored
Add contentProperties option
Closes GH-16. Reviewed-by: Titus Wormer <[email protected]>
1 parent 0ba573a commit 41b04df

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function externalLinks(options) {
1616
var rel = settings.rel
1717
var protocols = settings.protocols || defaultProtocols
1818
var content = settings.content
19+
var contentProperties = settings.contentProperties || {}
1920

2021
if (typeof rel === 'string') {
2122
rel = spaceSeparated(rel)
@@ -61,7 +62,11 @@ function externalLinks(options) {
6162
node.children.push({
6263
type: 'fragment',
6364
children: [],
64-
data: {hName: 'span', hChildren: extend(true, content)}
65+
data: {
66+
hName: 'span',
67+
hProperties: extend(true, contentProperties),
68+
hChildren: extend(true, content)
69+
}
6570
})
6671
}
6772
}

0 commit comments

Comments
 (0)