-
Notifications
You must be signed in to change notification settings - Fork 201
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
General cleanup / bug prevention #535
Comments
I think we can avoid |
Wouldn't it be a lot safer to do this. I mean, we probably don't even have to create an isolate context for each run, we can probably just remove the calls to For example: To get rid of And maybe we'd have to do something about @chenzhiguang do you have other ideas for things that might be worth while doing? |
@jonasfj Yes, like you said, we can also do not advance the position in the I have created a A |
Ah, so We could also look at reusing package note. both |
The source to be parsed does not necessarily have to be a single line; it can be a string that contains multiple lines.
I have taken a quick look at this package, but I'm not sure about its performance. Normally, the Markdown parser simply walks through the text character by character, avoiding the use of patterns intentionally. Additionally, if we have implemented The |
Following #531 (infinite loop) which caused some hard to debug issues. We've been wondering if we could reduce the risk of infinite loops, since these are hard to recover from gracefully (and doing so eats a lot of CPU that affects a server negatively).
But in general, reducing the risk of bugs would be nice. Perhaps, we can use this topic to discuss possible cleanups / tweaks to prevent/reduce bugs.
Some ideas include:
BlockSyntax.parseLines
loops indefinitely #533BlockParser.canParse()
in favor ofBlockParser.parse()
returningnull
null
fromBlockParser.parse()
whenever it doesn't advance_pos
while (!isDone) {
loops could benefit from a limit on iterations?BlockParser.retreat
andBlockParser.retreatBy
I'm not really sure how everything in this package works, maybe there is a need to retreat, and we can't just peek.
The text was updated successfully, but these errors were encountered: