Trim anchor link in heading cells, fixes #6324
Merge pull request #6483 from jhamrick/fix-heading-anchors

Trim anchor link in heading cells, fixes #6324