You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While Autolinker correctly handles <a> tags in the input string, it does not handle HTML <pre> elements correctly and will apply auto-linking within those texts.
Expected Autolinker.link(<pre>https://www.test.com</pre>) to be <pre>https://www.test.com</pre>.
Actual Autolinker.link(<pre>https://www.test.com</pre>) is <pre><a href="https://www.test.com" target="_blank" rel="noopener noreferrer">test.com</a></pre>.
The text was updated successfully, but these errors were encountered:
Is there anyway to prevent Autolinker from touching <pre> elements? I was wondering if, given no other config option, if replaceFn could be used to switch it off when the ancestor tag is a pre.
While Autolinker correctly handles
<a>
tags in the input string, it does not handle HTML<pre>
elements correctly and will apply auto-linking within those texts.Expected
Autolinker.link(<pre>https://www.test.com</pre>)
to be<pre>https://www.test.com</pre>
.Actual
Autolinker.link(<pre>https://www.test.com</pre>)
is<pre><a href="https://www.test.com" target="_blank" rel="noopener noreferrer">test.com</a></pre>
.The text was updated successfully, but these errors were encountered: