-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Adobe ExtendScript errors with self and certain regular expressions #31
Comments
Would you like to submit a pull request? |
I'm confident that the aforementioned fixes will work in IE6+, and I think I understand why they fail in the first place: in the first case the global variable is not available, and in the second case, there's a parse ambiguity wherein ExtendScript treats $ as a special variable, so it sees However there are two things that are not clear:
|
We'd like this package to work in as many environments as possible. The test suite only runs in Node so doesn't tell us whether the package works in other environments. The approach I'm taking with this package is to make the smallest possible changes only when absolutely necessary. In lieu of a comprehensive test suite we rely on our reasoning abilities. As a result, changes should be small and well documented. Does parenthesizing the regexp literal fix that problem? If so, let's go with that change. :) |
The second change is replacing the literal regexp syntax with the constructor form: |
Is it possible to use ExtendScript on macOS without installing Creative Cloud? |
The latest version unfortunately requires a CC account, but the CS5 ExtendScript toolkit is available at https://www.adobe.com/devnet/scripting/estk.html and you don't need to register to download. The OSX version is http://download.macromedia.com/pub/developer/estk/sdk/AdobeExtendScriptToolkit3.5.0-mul.dmg |
You can use the empty non-capturing group: |
We were addressing an unexpected issue about running in Adobe ExtendScript SheetJS/sheetjs#603.
It's the scripting runtime for Adobe products, and it claims to be "extended" ECMAScript.
After some digging, we found two issues:
self
is not available in extendscript and the object assignment assumesself
is defined:The indirect eval trick
(1,eval)('this')
appeared to work:=
are problematic:I believe the fix here is to turn
/=+$/
into a RegExp call:new RegExp("=+$")
The text was updated successfully, but these errors were encountered: