Copy link to clipboard
Copied
Using CS6.
I set the <a> tag to "No line breaks" in the tag library because the line breaks it inserted would create unwanted spaces on the page.
But now, when I run "apply source formatting" to fix my indenting, it actually deletes any space after the </a> so the next word is crammed up against my link.
i have not been able to figure out how to correct this with Tag Libraries. Anyone else have this problem?
Copy link to clipboard
Copied
Are you adding a non-breaking space entity after the anchor? See screenshot.
Copy link to clipboard
Copied
Well I thought about that, but it would require modifying countless existing links on my site. I don't understand the logic of DW deleting the space. Any link that appears in the middle of a sentence would need a space following it. There must be a way to tell DW to just leave it alone.
Copy link to clipboard
Copied
ConnieGoss wrote
There must be a way to tell DW to just leave it alone.
Yes, with a non-breaking space.
... it would require modifying countless existing links on my site.
Use Find & Replace. That's what it's for.
I don't understand the logic of DW deleting the space.
CS6 is legacy software now. It's no longer supported or updated. Adobe will never change how it works. So it's a moot point.
For what it's worth, apply source formatting in DW CC 2019 does not remove spaces after anchors.
Copy link to clipboard
Copied
I also have CC 2019 ... thanks for the nudge, I'm a little behind the times and needed to switch over anyway.
Here's what I found with CC: If I set the tag library to "no line breaks" the problem persists as previously described - DW strips out my space. However, setting the line breaks to "before and after tag" now works perfectly, whereas it used to break my code in CS6.
The problem with "no line breaks" looks like a bug to me, but using "before and after tag" is now a good solution. Thanks for your help, Nancy.
Copy link to clipboard
Copied
I have an idea...
Run one of your pages through the validator at http://validator.w3.org/nu and clean up any errors listed, then try running the Apply Source Formatting again.
There really shouldn't be any kind of space deletion, in any version of DW, when doing what you're doing. I'm thinking maybe there's a simple code error (like a missing end tag or something) that DW can't reconcile and it's confusing the program into doing something it's not supposed to.
Copy link to clipboard
Copied
Hi Jon, thanks for your suggestion. My code checks out error-free, and I still get the same result when I set the tag library to "no line breaks". But now that "before and after" is working well, it's no longer an issue for me.
Copy link to clipboard
Copied
P.S. Of course I could use "Find and Replace" ... except that there are also many links that I specifically do NOT want to add a space to ... so it would have required one-by-one examination anyway.