Skip to content

Commit 86c81c9

Browse files
authored
Merge pull request #2095 from dxc-technology/gomezivann/releases-fix
Releases page update
2 parents 9bce4c7 + 894c151 commit 86c81c9

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

apps/website/screens/common/HalstackMarkdownParser.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { DxcBulletedList, DxcHeading, DxcLink } from "@dxc-technology/halstack-react";
22
import { ReactMarkdown } from "react-markdown/lib/react-markdown";
33
import Code from "./Code";
4-
import React from "react";
4+
import React, { Children } from "react";
55

6-
type Props = { markdown: string };
7-
8-
const HalstackMarkdownParser = ({ markdown }: Props) => (
6+
const HalstackMarkdownParser = ({ markdown }: { markdown: string }) => (
97
<ReactMarkdown
108
components={{
119
a: ({ href, children }) => (
@@ -14,11 +12,14 @@ const HalstackMarkdownParser = ({ markdown }: Props) => (
1412
</DxcLink>
1513
),
1614
code: ({ children }) => <Code>{children}</Code>,
17-
h3: ({ children }) => <DxcHeading level={4} text={children as string} />,
15+
h3: ({ children }) => (
16+
<DxcHeading
17+
level={4}
18+
text={Children.map(children, (child) => (child as string).replace(/[^\x00-\x7F]/g, "")).join("")}
19+
/>
20+
),
1821
ul: ({ children }) => (
19-
<DxcBulletedList>
20-
{React.Children.map(children, (child) => (child !== "\n" ? child : undefined))}
21-
</DxcBulletedList>
22+
<DxcBulletedList>{Children.map(children, (child) => (child !== "\n" ? child : undefined))}</DxcBulletedList>
2223
),
2324
li: ({ children }) => <DxcBulletedList.Item>{children}</DxcBulletedList.Item>,
2425
}}

apps/website/screens/overview/releases/ReleasesPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ const getReleasesPageSections = (releases: Release[]) => {
9090
<em>
9191
Released on{" "}
9292
{new Date(release.published_at).toLocaleDateString("en-US", {
93+
year: "numeric",
9394
weekday: "long",
9495
month: "long",
9596
day: "numeric",

0 commit comments

Comments
 (0)