JavaScript parse error (scripts need to be valid ECMAScript 5): Parse error: Unterminated string literal in file 'MediaWiki:Gadget-Twinkle.js' on line 12
siddharthvp opened this issue · 4 comments
Caused by 28c846b. Needs to be looked into.
so I tried out this starter on idwiki, and encountered this issue.
My trick here is to prettify the built codes and use it there: https://id.wikipedia.org/wiki/MediaWiki:Gadget-TwinkleV3.js
and the mediawiki error message points to this line in the gadget
which apparently caused by this RegExp in orange-18n:
Upstream bug reports:
Also relevant is https://phabricator.wikimedia.org/T75714 since if that is solved, this issue will be resolved.
Belated note: https://phabricator.wikimedia.org/T298386 has been resolved, this should not be occurring now.
In case it does occur, there's also the option of using |requiresES6
in the gadget definition which disables the MW script validator altogether. JS in non-ES6 browsers is anyway not supported at all by MediaWiki now (T178356).