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

Fix <sup><a> from getting wrapped with [ ] #1928

Merged
merged 3 commits into from
Feb 3, 2022
Merged

Fix <sup><a> from getting wrapped with [ ] #1928

merged 3 commits into from
Feb 3, 2022

Conversation

simurai
Copy link
Contributor

@simurai simurai commented Feb 2, 2022

What are you trying to accomplish?

This fixes https://github.com/github/primer/issues/677.

Before After
Screen Shot 2022-02-02 at 20 51 28 Screen Shot 2022-02-02 at 21 16 01

Currently when adding

Hi, <sup><a href="#">world</a></sup>

to a comment, the link is wrapped with [ ]: Hi, world

What approach did you choose and why?

Replace the loosely scoped styles for footnotes:

sup > a::before {
content: '[';
}
sup > a::after {
content: ']';
}

with:

 [data-footnote-ref] {
    &::before {
      content: '[';
    }
    &::after {
      content: ']';
    }
  }

What should reviewers focus on?

Diff is best viewed with "whitespace hidden".

Are additional changes needed?

  • No, this PR should be ok to ship as is. 🚢

@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2022

🦋 Changeset detected

Latest commit: a64ca0d

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

This PR includes changesets to release 1 package
Name Type
@primer/css 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

@simurai simurai marked this pull request as ready for review February 3, 2022 01:23
@simurai simurai requested a review from a team as a code owner February 3, 2022 01:23
@simurai simurai requested review from jonrohan and vdepizzol February 3, 2022 01:23
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.

👏🏻

@simurai simurai merged commit 0fb6789 into main Feb 3, 2022
@simurai simurai deleted the footnote-ref branch February 3, 2022 01:38
@primer-css primer-css mentioned this pull request Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants