Skip to content

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

Merged
simurai merged 3 commits into
mainfrom
footnote-ref
Feb 3, 2022
Merged

Fix <sup><a> from getting wrapped with [ ]#1928
simurai merged 3 commits into
mainfrom
footnote-ref

Conversation

@simurai

@simuraisimurai commented Feb 2, 2022

Copy link
Copy Markdown
Contributor

What are you trying to accomplish?

This fixeshttps://github.com/github/primer/issues/677.

BeforeAfter
Screen Shot 2022-02-02 at 20 51 28Screen 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

changeset-botBot commented Feb 2, 2022

Copy link
Copy Markdown

🦋 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
NameType
@primer/cssPatch

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 ownerFebruary 3, 2022 01:23

@jonrohanjonrohan left a comment

Copy link
Copy Markdown
Member

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 mainFeb 3, 2022
@simurai
simurai deleted the footnote-ref branch February 3, 2022 01:38
@primer-cssprimer-css mentioned this pull request Feb 3, 2022
Sign up for freeto 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

@simurai@jonrohan@actions-user