Steps to replicate the issue (include links if applicable):
- https://test.wikipedia.org/w/index.php?title=User:Nux/test_syntax_es6.js&action=edit (can be tested as an anon)
Note that the above is ES6-compatible code (JavaScript from 2015).
What happens?:
There are a few problems, probably related:
- Try to fold hide function -> you should not be able to see the // broken fold ^ comment (but you do see it).
- In filehide function this part seem to start a comment: str.replace(/<gallery/gi, (a, options, content) => { (parser works fine when you change the arrow function to function(a, options, content))
- In show function the comment state is reverted, but starts again after str.replace(/<<<([0-9]+)>>>/g, (a, i) => {.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
Classes seem to suggest Ace editor is used for code. I tried Ace demo editor and it worked fine. An upgrade is perhaps required?