Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix markdown ordered list numbering #4989

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Fix markdown ordered list numbering #4989

merged 3 commits into from
Nov 14, 2024

Conversation

rbren
Copy link
Collaborator

@rbren rbren commented Nov 13, 2024

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

Copy link
Collaborator

@tofarr tofarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - could there be problems with the open ended props? (Like with params other than start being passed in?)

@rbren
Copy link
Collaborator Author

rbren commented Nov 13, 2024

Hah yes, the linter seems mad about it too

@rbren rbren merged commit 52a428d into main Nov 14, 2024
14 checks passed
@rbren rbren deleted the fix-markdown-list-numbering branch November 14, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants