Skip to content

Commit

Permalink
add / after language
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleguido committed Sep 9, 2024
1 parent d625de3 commit d2963ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/StoryModule/ModuleTextAnchor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const ModuleTextAnchor = ({ node, children, href, ...props }) => {
// check if href is the website one (internal links)
if (href.indexOf(import.meta.env.VITE_ORIGIN) !== -1) {
// remove origin, e.g. `https://` and language `/en/` from the href to make page specific
const to = href.replace(import.meta.env.VITE_ORIGIN, '').replace(LanguagePathRegExp, '')
const to = href.replace(import.meta.env.VITE_ORIGIN, '').replace(LanguagePathRegExp, '/')
return (
<LangLink className="ModuleTextAnchor" to={to} {...props}>
{textNode}
Expand Down

0 comments on commit d2963ee

Please sign in to comment.