Commit bb03aed1 authored by Scott Simontis's avatar Scott Simontis Committed by Nicolas Giard

fix: exclude tel: links from parsing #1318 (#1344)

Telephone links will no longer be incorrectly parsed as web links. Signed-off-by: 's avatarScott Simontis <yo@scottsimontis.io>
parent 3092615c
......@@ -39,8 +39,9 @@ module.exports = {
$('a').each((i, elm) => {
let href = $(elm).attr('href')
// -> Ignore empty / anchor links
if (!href || href.length < 1 || href.indexOf('#') === 0 || href.indexOf('mailto:') === 0) {
// -> Ignore empty / anchor links, e-mail addresses, and telephone numbers
if (!href || href.length < 1 || href.indexOf('#') === 0 ||
href.indexOf('mailto:') === 0 || href.indexOf('tel:') === 0) {
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment