Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

Fix ordered list display in markdown (#1175)

Heath Henley7b6498305bf2
diff --git a/challenges/type-unions/prompt.md b/challenges/type-unions/prompt.md
index ad4e5357..b55126ac 100644
--- a/challenges/type-unions/prompt.md
+++ b/challenges/type-unions/prompt.md
@@ -67,12 +67,9 @@ const landSpacecraft = (distance: Distance) => {
Unions are a very deep topic, actually. The three things you need to know right now are:
-1. unions are unordered
- a. and if you implement hacks to try to depend on the order your tests will break across different TypeScript versions
-1. the items in a union are unique
- a. so doing `1 | 1 | 2 | 3` is the same as `1 | 2 | 3`
-1. the `never` type is an empty union
- a. we'll learn more about `never` [later on](todo-never)
+1. unions are unordered: if you implement hacks to try to depend on the order your tests will break across different TypeScript versions
+1. the items in a union are unique: so doing `1 | 1 | 2 | 3` is the same as `1 | 2 | 3`
+1. the `never` type is an empty union: we'll learn more about `never` [later on](todo-never)
## Solving This Challenge
diff --git a/packages/ui/src/components/markdown.tsx b/packages/ui/src/components/markdown.tsx
index 4c88ab2e..c6c46e82 100644
--- a/packages/ui/src/components/markdown.tsx
+++ b/packages/ui/src/components/markdown.tsx
@@ -53,6 +53,9 @@ export function Markdown({ children, className }: { children: string; className?
ul: ({ className, ...props }) => (
<ul className={clsx(className, 'list-disc ps-10')} {...props} />
),
+ ol: ({ className, ...props }) => (
+ <ol className={clsx(className, 'list-decimal ps-10')} {...props} />
+ ),
h1: ({ className, ...props }) => (
<h1 className={clsx(className, 'mb-2 pb-2 text-3xl font-bold')} {...props} />
),