Skip to content

Commit

Permalink
fix: preserve starting numbers in markdown ordered lists
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Nov 13, 2024
1 parent a93f140 commit 8ba3856
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/markdown/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ export function ul({
// Custom component to render <ol> in markdown
export function ol({
children,
...props
}: React.ClassAttributes<HTMLElement> &
React.HTMLAttributes<HTMLElement> &
ExtraProps) {
return (
<ol className="list-decimal ml-5 pl-2 whitespace-normal">{children}</ol>
<ol className="list-decimal ml-5 pl-2 whitespace-normal" {...props}>

Check failure on line 21 in frontend/src/components/markdown/list.tsx

View workflow job for this annotation

GitHub Actions / Lint frontend

Prop spreading is forbidden
{children}
</ol>
);
}

0 comments on commit 8ba3856

Please sign in to comment.