Skip to main content
Known Participant
March 25, 2019
Question

Apply Source Formatting removes space after <a> tags

  • March 25, 2019
  • 1 reply
  • 603 views

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?

This topic has been closed for replies.

1 reply

Nancy OShea
Community Expert
Community Expert
March 25, 2019

Are you adding a non-breaking space entity after the anchor?  See screenshot.

Nancy O'Shea— Product User & Community Expert
Known Participant
March 25, 2019

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.

Known Participant
March 25, 2019

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.


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.