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
Regex hangs the browser #23
Comments
How do you get it to hang? I tried deleting the whole comment section on interactiveshaderformat.com and it seems to work (error) just fine but not hang |
Here's the part of my shader which is causing it to hang, try pasting this into interactiveshaderformat.com
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
interactive-shader-format-js/src/MetadataExtractor.js
Line 11 in bfaf801
I'm trying to run some non-ISF shaders through the parser which cause this line to hang the browser. Instead of doing this validity check and grabbing the metadata block with an expensive regex, why not use the
startIndex
andendIndex
endpoints you define later?If you're wondering why I'm trying to parse non-ISF shaders, consider a live-update application where someone makes a typo, or in my case where I'm supporting multiple shader metadata formats, and only want to invoke ISF if it's a valid ISF shader.
The text was updated successfully, but these errors were encountered: