Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Member
Author
|
@calculuschild this should work to walk arrays of arrays of tokens. One question: Should we flatten with infinite depth? or should we only flatten 1 or 2 levels deep? The only issue I found with doing Infinite depth is there can be a stack overflow if there is a circular dependency. I don't think that is a big issue but something to think about. a = [1]
b = [2]
a.push(b)
b.push(a)
a.flat(Infinity) |
calculuschild
approved these changes
Jan 21, 2024
Member
Author
|
I agree. This shouldn't affect core marked at all. Only extensions |
styfle
approved these changes
Jan 25, 2024
Member
styfle
left a comment
There was a problem hiding this comment.
I think you could also use a large-ish depth instead of Infinity, perhaps 1000, and still cover most use cases.
But I agree, its only for self-referencing extensions which is probably a small minority.
This was referenced Jun 19, 2024
This was referenced Sep 13, 2024
This was referenced Sep 23, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Marked version: 11.1.1
Description
Flatten custom extension childToken arrays before running them through walk tokens. This will allow custom extensions to have child tokens like the
tabletoken where therowsfield is an array of arrays of tokens.Contributor
Committer
In most cases, this should be a different person than the contributor.