Closed SevereOverfl0w closed 7 years ago
This is fixed in master. This code works (as per http://asciidoctor.org/docs/install-and-use-asciidoctorjs/#using-asciidoctor-from-javascript):
cljs.user=> (def v8 (js/require "v8"))
#'cljs.user/v8
cljs.user=> (v8.setFlagsFromString "--nouse_strict")
nil
cljs.user=> (def ad (js/require "asciidoctor.js"))
#'cljs.user/ad
cljs.user=> (do
#_=> (ad)
#_=> nil)
nil
cljs.user=> (js/Opal.Asciidoctor.$convert
#_=> (str "http://asciidoctor.org[*Asciidoctor*] "
#_=> "running on http://opalrb.org[_Opal_] "
#_=> "brings AsciiDoc to the browser!"))
"<div class=\"paragraph\">\n<p><a href=\"http://asciidoctor.org\"><strong>Asciidoctor</strong></a> running on <a href=\"http://opalrb.org\"><em>Opal</em></a> brings AsciiDoc to the browser!</p>\n</div>"
cljs.user=>
As first reported on lumo slack.
((node/require "asciidoctor.js"))
Did work with:
Does not work with Lumo though. Giving:
TypeError: Cannot assign to read only property 'length' of object '[object String]'
There is a new error when this is added: