-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix extra whitespace in some link markup cases
Our link icon markup incorrectly leaves behind whitespace in certain cases. For example, given a link like this: <a href="https://example.com"> text </a> the markup will generate: <a href="https://example.com" class="a-link a-link--icon"> <span class="a-link__text"> text </span> <svg class="cf-icon-svg cf-icon-svg--external-link">...</svg> </a> The extra whitespace in the <span> gets underlined incorrectly. See "View a webinar on the rule" on https://www.consumerfinance.gov/know-before-you-owe/ for an example where this happens on the live site. This fix attempts to strip surrounding whitespace from the link text to prevent this happening.
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters