Skip to content

Commit 632d8a0

Browse files
committed
Try rendering line number without preceding text.
1 parent ca71a42 commit 632d8a0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/code-view/__tests__/code-view.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe("CodeView", () => {
2323
render(<CodeView content={`# Hello World\n\nThis is a markdown example.`}></CodeView>);
2424
const wrapper = createWrapper()!.findCodeView()!;
2525
const content = wrapper.findContent();
26-
expect(content.getElement()).toHaveTextContent("Line 1 # Hello World Line 2 Line 3 This is a markdown example.");
26+
expect(content.getElement()).toHaveTextContent("1. # Hello World 2. 3. This is a markdown example.");
2727
});
2828

2929
test("correctly renders copy button slot", () => {

src/code-view/internal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function InternalCodeView({
8989
</td>
9090
)}
9191
<td className={styles["code-line"]}>
92-
<span className={styles["screenreader-only"]}>Line {index + 1} </span>
92+
<span className={styles["screenreader-only"]}>{index + 1}. </span>
9393
<Box variant="code" fontSize="body-m">
9494
<span
9595
className={clsx(

0 commit comments

Comments
 (0)