更新:Bug解決。答案要轉到誰解釋爲什麼修復工作。爲什麼Chrome間距在一個JS文件中工作而不是另一個?
如果您突出顯示並複製此頁面第一段的文本,然後將其粘貼到富文本編輯器(Dreamweaver或富文本模式下的gmail)中,您將看到一些文本被自動鏈接。基本上,它的工作原理:
http://seox.org/link-building-pro.html - >http://seox.org/lbp/old-pretty.js
我試圖建立第二個版本,但某處我打破了它的方式。如果您在使用相同過程走在這個新的URL,前間距和鏈接後,在Chrome中被刪除:
http://seox.org/test.html - >http://seox.org/lbp/lb-core.js
爲什麼間距正常工作中的第一個,但不在第二個?更重要的是,我如何解決第二個問題,使其不會出錯?
我之前問過這個問題的一個變種,並得到了一個有用的和有趣的答案,但希望我已經問這個問題全部細節。前面的問題,我有一個難以理解的答案,位於這裏: Javascript: Whitespace Characters being Removed in Chrome (but not Firefox)
在此先感謝您的時間!
編輯:我添加了一個懸賞這個帖子,將不勝感激就如何修復bug準確的指令(而不是一般性的建議
爲了更好地說明這個錯誤,我有。複製的灰色框(從第二頁),注意間距是如何之前和之後的一個標籤去除:
Link Building 2 is an amazing tool that helps your website visitors share your content, with proper attribution. It connects to email, social sharing sites, eCommerce sites, and is the<a href="http://seox.org/test.html#seo">SEO</a>'s best friend. Think of it as the sneeze in the viral marketing metaphor.
<div>
<p id="credit"><br />
Read more about<a href="http://seox.org/test.html">Text Citations</a>by<a href="http://seox.org">seox.org</a></p>
</div>
第二次更新:
我能夠加入到解決的bug下面的函數processSel()的頂部:
lbp.vrs.holder.style.position = "absolute";
我會獎勵答對誰可以給爲什麼這個最好的解釋修復了Chrome中的間距問題。
是在上面的例子(或插入的任何鏈路)動態插入的鏈接 「SEO」 仍會unspaced。關於如何解決這些間距的任何想法? – Matrym 2010-06-06 16:51:50