-
Bug
-
Resolution: Fixed
-
P3
-
8
-
None
-
b100
-
generic
-
generic
-
Verified
To run marked.js (https://github.com/chjj/marked) on Nashorn, I stripped off the Node related front end and wrote a simple driver: markdown.js.
There is one regex in marked.js (block.paragraph) whose captures appear to work differently on V8. On V8, both cap[0] and [cap[1] are valid and appear identical, while on Nashorn only cap[0] is defined. The code fails because it expects cap[1].
To reproduce, execute the attached files:
jjs markdown.js -- phonegap.md
Then find the code with a 'batsatt' comment and switch the commented out line for the one above which uses cap[0]. This works.
I am using Java(TM) SE Runtime Environment (build 1.8.0-ea-b92).
There is one regex in marked.js (block.paragraph) whose captures appear to work differently on V8. On V8, both cap[0] and [cap[1] are valid and appear identical, while on Nashorn only cap[0] is defined. The code fails because it expects cap[1].
To reproduce, execute the attached files:
jjs markdown.js -- phonegap.md
Then find the code with a 'batsatt' comment and switch the commented out line for the one above which uses cap[0]. This works.
I am using Java(TM) SE Runtime Environment (build 1.8.0-ea-b92).