Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing newlines from the output of LinkComponent #1183

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

camertron
Copy link
Contributor

The LinkComponent appends a trailing newline, which can appear as unwanted whitespace between the link and any text that follows it. The problem is that the link_component.erb file contains a trailing newline, and ERB faithfully reproduces it in the rendered output. This PR replaces the template with a call method.

@camertron camertron requested a review from jonrohan June 2, 2022 18:40
@changeset-bot
Copy link

changeset-bot bot commented Jun 2, 2022

🦋 Changeset detected

Latest commit: 04fa1a2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@camertron camertron temporarily deployed to github-pages June 2, 2022 18:43 Inactive
@camertron camertron temporarily deployed to github-pages June 2, 2022 20:27 Inactive
@camertron camertron marked this pull request as ready for review June 2, 2022 21:33
@camertron camertron requested a review from a team June 2, 2022 21:33
Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@jonrohan jonrohan merged commit 84b9e4e into main Jun 2, 2022
@jonrohan jonrohan deleted the link_component_trailing_newlines branch June 2, 2022 21:40
@primer-css primer-css mentioned this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants