Login  Register

Re: Upgrading Asciidoctor.js to the latest version of Asciidoctor

Posted by ggrossetie on Sep 24, 2013; 11:08pm
URL: https://discuss.asciidoctor.org/Upgrading-Asciidoctor-js-to-the-latest-version-of-Asciidoctor-tp636p658.html

I copied the new html5 erb templates.

The templates below make the Opal compiler angy :
lib/asciidoctor/backends/html5/block_listing.opalerb
lib/asciidoctor/backends/html5/block_video.opalerb
lib/asciidoctor/backends/html5/inline_image.opalerb
lib/asciidoctor/backends/html5/section.opalerb

"backslash must appear before newline" [1]. Maybe someone is familiar with this error ?

I am now stuck with a Javascript error when running Asciidoctor.js :

Uncaught TypeError: Cannot call method '$[]' of undefined asciidoctor.js:2181
def.$lock_in_subs asciidoctor.js:2181
Lexer.constructor.$next_block asciidoctor.js:4352
Lexer.constructor.$next_section asciidoctor.js:3875
Lexer.constructor.$parse

default_subs = $scope.SUBS is undefined and the $scope is initialized with $scope = AbstractBlock._scope

The SUBS constants from Substituters are not loaded in the "scope" but I don't know why... ideas ?


Guillaume.
[1] https://github.com/opal/opal/blob/master/lib/opal/lexer.rb#L582