rehype-external-links
Advanced tools
Comparing version
@@ -60,3 +60,3 @@ /** | ||
import {parse} from 'space-separated-tokens' | ||
import absolute from 'is-absolute-url' | ||
import isAbsoluteUrl from 'is-absolute-url' | ||
import extend from 'extend' | ||
@@ -111,3 +111,7 @@ | ||
if (absolute(url) && protocols.includes(protocol)) { | ||
if ( | ||
isAbsoluteUrl(url) | ||
? protocols.includes(protocol) | ||
: url.startsWith('//') | ||
) { | ||
if (target) { | ||
@@ -114,0 +118,0 @@ node.properties.target = target |
{ | ||
"name": "rehype-external-links", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "rehype plugin to automatically add `target` and `rel` attributes to external links", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
18787
0.41%187
2.19%