Skip to content

Commit

Permalink
Merge pull request #11392 from wellcomecollection/fix-contributors
Browse files Browse the repository at this point in the history
stop unicode characters printing to page
  • Loading branch information
gestchild authored Nov 11, 2024
2 parents afb083c + f30e4a8 commit 910b07c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/webapp/components/Tags/Tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ type PartWithSeparatorProps = {
$isLast: boolean;
};

const nbsp = '\\00a0';

const PartWithSeparator = styled.span.attrs({
className: font('intr', 5),
})<PartWithSeparatorProps>`
&::after {
display: ${props => (props.$isLast ? 'none' : 'inline')};
/* non-breaking space (\u00A0) keeps characters that would otherwise break (e.g. hyphens) stuck to the preceding text */
content: '\u00A0${props => props.$separator}\u00A0';
content: '${nbsp}${props => props.$separator}${nbsp}';
}
`;

Expand Down

0 comments on commit 910b07c

Please sign in to comment.