This project has moved. For the latest updates, please go here.

I've got ArrayTypeMismatchException

Oct 24, 2014 at 2:09 PM
Edited Oct 24, 2014 at 2:12 PM
I'm using marked.js library for markdown parsing. Everithing works fine except parsing tables.
var engine = new Jurassic.ScriptEngine();

engine.SetGlobalValue("input", input);
    gfm: true,
    tables: true

  var renderer = new marked.Renderer();

  renderer.table = function (header, body) {
    return '<table class=""table table-bordered"">\n'
      + '<thead>\n'
      + header
      + '</thead>\n'
      + '<tbody>\n'
      + body
      + '</tbody>\n'
      + '</table>\n';

  var result = marked(input, { renderer: renderer });
If input variable contains markdown table then Jurassic throws an ArrayTypeMismatchException.
Oct 31, 2014 at 1:49 AM
I just had the same problem today, doing the exact same thing. I've opened an issue and attached a sample program: