Telephone links will no longer be incorrectly parsed as web links. Signed-off-by: Scott Simontis <yo@scottsimontis.io>
This commit is contained in:
parent
3092615c5e
commit
bb03aed1c8
@ -39,8 +39,9 @@ module.exports = {
|
|||||||
$('a').each((i, elm) => {
|
$('a').each((i, elm) => {
|
||||||
let href = $(elm).attr('href')
|
let href = $(elm).attr('href')
|
||||||
|
|
||||||
// -> Ignore empty / anchor links
|
// -> Ignore empty / anchor links, e-mail addresses, and telephone numbers
|
||||||
if (!href || href.length < 1 || href.indexOf('#') === 0 || href.indexOf('mailto:') === 0) {
|
if (!href || href.length < 1 || href.indexOf('#') === 0 ||
|
||||||
|
href.indexOf('mailto:') === 0 || href.indexOf('tel:') === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user