Why does the Chrome spacing work in one JS file and not the other?

Posted by Matrym on Stack Overflow See other posts from Stack Overflow or by Matrym
Published on 2010-06-04T00:30:51Z Indexed on 2010/06/06 4:52 UTC
Read the original article Hit count: 329

Filed under:
|
|

If you highlight and copy the text in the first paragraph on this page, then paste it into a rich text editor (dreamweaver or gmail in rich text mode), you will see that some of the text is automagically linked. Basically, it works:

http://seox.org/link-building-pro.html --> http://seox.org/lbp/old-pretty.js

I'm trying to build a second version, but somewhere along the way I broke it. If you go along with the same process on this new url, spacing before and after the link are removed in Chrome:

http://seox.org/test.html --> http://seox.org/lbp/lb-core.js

Why does the spacing work correctly in the first one, but not in the second? More importantly, how do I fix the second one so that it doesn't bug out?

I asked a variation of this question before, and got a helpful and interesting answer, but hopefully I've asked the question with full detail this time around.

Thanks in advance for your time!


Edit: I've added a bounty to this post, and would greatly appreciate precise instructions on how to fix the bug (rather than general suggestions.

To better illustrate the bug, I've copied the gray box (from the second page) below. Note how the spacing is removed before and after the a tags:

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>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about chrome