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 infinite loop and broken list rendering #81

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

treo
Copy link
Contributor

@treo treo commented Jan 15, 2025

In our use of SvelteMarkdown I ran into a couple of weird issues:

  1. Some lists would render wrong, by repeating their contents. e.g.
    image

  2. Others would crash with a message like: Uncaught (in promise) RangeError: Maximum call stack size exceeded when given a simple nested list.
    image

I've tracked both issues down to the Parser component where the recursive call would receive ...rest instead of a more limited set of parameters like ...parserRest like it is done in other places in the component.

I've adapted both of the list related calls to only pass on the more limited set of parameters and extended the tests to cover both types of nested lists and a mixed usage case.

@jaysin586 jaysin586 merged commit 135386e into humanspeak:main Jan 16, 2025
1 check passed
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.

2 participants