OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Fix markdown ordered list numbering

Open rbren opened this issue 1 year ago • 1 comments

This PR fixes the markdown renderer to preserve starting numbers in ordered lists. Previously, all ordered lists would start at 1 regardless of the specified starting number.

Changes

  • Modified the ordered list component to pass through all props, including the start attribute

Before

All lists would start at 1:

1. First item
2. Second item

5. This would show as 1.
6. This would show as 2.

After

Lists preserve their starting numbers:

1. First item
2. Second item

5. This shows as 5.
6. This shows as 6.

To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:ca5b9ab-nikolaik   --name openhands-app-ca5b9ab   docker.all-hands.dev/all-hands-ai/openhands:ca5b9ab

rbren avatar Nov 13 '24 23:11 rbren

Hah yes, the linter seems mad about it too

rbren avatar Nov 13 '24 23:11 rbren