Skip to content

Commit

Permalink
Refactor code-style
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 10, 2022
1 parent 483a99f commit f127dd9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Expand Up @@ -95,15 +95,15 @@ export default function rehypeExternalLinks(options = {}) {

const target = callIfNeeded(options.target, node)

const _rel = callIfNeeded(options.rel, node)
const rel = typeof _rel === 'string' ? parse(_rel) : _rel
const relRaw = callIfNeeded(options.rel, node)
const rel = typeof relRaw === 'string' ? parse(relRaw) : relRaw

const protocols =
callIfNeeded(options.protocols, node) || defaultProtocols

const _content = callIfNeeded(options.content, node)
const contentRaw = callIfNeeded(options.content, node)
const content =
_content && !Array.isArray(_content) ? [_content] : _content
contentRaw && !Array.isArray(contentRaw) ? [contentRaw] : contentRaw

const contentProperties =
callIfNeeded(options.contentProperties, node) || {}
Expand Down

0 comments on commit f127dd9

Please sign in to comment.