所以我有一段看起来像这样的HTML ......
<p>This is some copy. In this copy is the word hello</p>
Run Code Online (Sandbox Code Playgroud)
我想使用jquery将单词hello转换为链接.
<p>This is some copy. In this copy is the word <a href="">hello</a></p>
Run Code Online (Sandbox Code Playgroud)
这本身并不太难.我的问题是,如果这个词已经是一个链接,如下面的例子...
<p>In this copy is the <a href="">word hello</a></p>
Run Code Online (Sandbox Code Playgroud)
我不希望最终在链接中找到链接...
<p>In this copy is the <a href="">word <a href="">hello</a></a></p>
Run Code Online (Sandbox Code Playgroud)
任何帮助将非常感激.