Skip to content

Commit

Permalink
ignoreTags support for linkifyElement
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrasser committed Apr 17, 2016
1 parent e474b1d commit 7dfe1db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/linkify-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ function linkifyElementHelper(element, opts, doc) {
throw new Error(`Cannot linkify ${element} - Invalid DOM Node type`);
}

let ignoreTags = opts.ignoreTags;

// Is this element already a link?
if (element.tagName === 'A' /*|| element.hasClass('linkified')*/) {
if (element.tagName === 'A' || ignoreTags.indexOf(element.tagName) >= 0) {
// No need to linkify
return element;
}
Expand Down

0 comments on commit 7dfe1db

Please sign in to comment.