Skip to content

Commit

Permalink
Fix broken hash links
Browse files Browse the repository at this point in the history
  • Loading branch information
joebochill committed Oct 31, 2022
1 parent d4d9c35 commit 9e469ec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## v6.1.1 (October 31, 2022)
## v6.1.1 (November 1, 2022)

### Fixed

Expand Down
15 changes: 0 additions & 15 deletions docs/src/__configuration__/markdownMapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,6 @@ export const componentsMap = {
),
a: (props: React.LinkHTMLAttributes<HTMLLinkElement>): JSX.Element => {
let tProps;
if (props.href?.includes('#')) {
tProps = props as TypographyProps<'a'>;

return (
<Typography
component={'a'}
sx={{
fontWeight: 400,
textDecoration: 'none',
color: (theme: Theme) => theme.palette.primary.main,
}}
{...tProps}
/>
);
}
if (props.href && (props.href.match(/^http/gi) || props.href.match(/^mailto/gi))) {
tProps = props as TypographyProps<'a'>;
return <ExternalLink {...tProps} />;
Expand Down

0 comments on commit 9e469ec

Please sign in to comment.