Skip to content

Commit

Permalink
moonbase: Enable extra Markdown features in description
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNite committed Oct 7, 2024
1 parent 31cdc03 commit 253be05
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const TabBarClasses = spacepack.findByExports(
"tabBarItem",
"headerContentWrapper"
)[0].exports;
const MarkupClasses = spacepack.findByExports("markup", "inlineFormat")[0]
.exports;

export default function ExtensionCard({ uniqueId }: { uniqueId: number }) {
const [tab, setTab] = React.useState(ExtensionPage.Info);
Expand Down Expand Up @@ -213,8 +215,17 @@ export default function ExtensionCard({ uniqueId }: { uniqueId: number }) {
>
{tab === ExtensionPage.Info && <ExtensionInfo ext={ext} />}
{tab === ExtensionPage.Description && (
<Text variant="text-md/normal">
{MarkupUtils.parse(description ?? "*No description*")}
<Text
variant="text-md/normal"
class={MarkupClasses.markup}
style={{ width: "100%" }}
>
{/* @ts-expect-error This type needs to be updated! */}
{MarkupUtils.parse(description ?? "*No description*", true, {
allowHeading: true,
allowLinks: true,
allowList: true
})}
</Text>
)}
{tab === ExtensionPage.Settings && <Settings ext={ext} />}
Expand Down

0 comments on commit 253be05

Please sign in to comment.