[go: up one dir, main page]

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 issue where lists that didn't start at 1 were not respected #116

Merged
merged 3 commits into from
Aug 12, 2021
Merged

fix issue where lists that didn't start at 1 were not respected #116

merged 3 commits into from
Aug 12, 2021

Conversation

raidancampbell
Copy link
Contributor
@raidancampbell raidancampbell commented Aug 6, 2021

The problem is more thoroughly elaborated in this issue for a depending project. The tl;dr is that most/all markdown processors will respect the first number in a numbered list, and ignore all subsequent values. The commonmark reference implementation implements this, and github flavored markdown respects this as well.

This change is to recalculate the list enumeration value based on the starting number in the list. It has been manually tested, and lists starting at 0 are rendered correctly as well.

Sample showing fixed behavior:
image

Sample showing fixed behavior with 0:
image

@muesli
Copy link
Contributor
muesli commented Aug 11, 2021

Awesome! Would you mind adding a test for that functionality?

@muesli muesli added the bug Something isn't working label Aug 11, 2021
@raidancampbell
Copy link
Contributor Author

Resolved via 39dc9a7. I'm not entirely sure what the workflow is for new tests, but I made one, stubbed out generateExamples, and spot-checked the generated result as correct.

@muesli muesli added the renderer Everything related to the markdown renderer label Aug 12, 2021
@muesli muesli merged commit 49f2da7 into charmbracelet:master Aug 12, 2021
@muesli
Copy link
Contributor
muesli commented Aug 12, 2021

Thank you for your contribution! ❤️

@raidancampbell
Copy link
Contributor Author

Do you have any release cadence? I'd love a tag sometime in the next week or two

@muesli
Copy link
Contributor
muesli commented Aug 12, 2021

I still have a few issues I'd like to get in for the next release, but in the next week or two sounds reasonable. You can always pin your import to a specific commit in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working renderer Everything related to the markdown renderer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants