-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
demo worker #1418
demo worker #1418
Conversation
Check out the current redos here This takes about 10 seconds to parse on my machine. You can change the version to |
I also got it working with PRs I moved quite a bit of code around to make it more readable and added a loading screen at the beginning since we need to load the versions and worker before anything will work. the latest version is at: https://docs-g29qo7nxq.now.sh/demo/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! 🎉
I was going to suggest we start deploying PR's using ZEIT Now but this is almost just as good, as long as we don't refactor marked into multiple files.
If we refactor marked in multiple files and use ES modules it should still work in modern browsers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never used WebWorkers but this looks about like I would have imagined it.
Can we recycle some of this code into a marked+timeout API usable in Node and web contexts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just verification for milestone considerations. This only effects the demo site at this point, not marked itself. It improves our ability to discover the one major bug type we feel rushed to fix.
@joshbruce correct, this only changes the demo site |
Sorry didn't notice this the first time but I'd like to add the same caveat for my approval as what's on #1414 - what's up with Snyk? What needs to happen? What can I do to help that endeavor? |
see my comment on Snyk at #1414 (comment) |
Description
I added a web worker to the demo page. This will allow easier testing for redos attacks.
You can test it out at: https://docs-8bxhez41v.now.sh/demo/
This PR adds is branched off #1415 with https://github.com/remyhunt/marked/pull/1 merged so we should get that PR merged first.
Contributor
Committer
In most cases, this should be a different person than the contributor.