Login  Register

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

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

Thanks Dan for the detailed explanation.
I picked some of your changes from https://github.com/mojavelinux/asciidoctor/commits/a51027d9f99f8d9c06b475e70595864f27413ffd

Do you know how can I rewrite this syntax in asciidoctor/lib/asciidoctor/document.rb:
@attribute_overrides = (options[:attributes] || {}).inject({}) do |collector,(key,value)|

The compiler complains :
rake aborted!
parse error on value "(" (PAREN_BEG) :asciidoctor/document:124
  (in /home/mogztter/workspaces/asciidoctor.js/asciidoctor/lib/asciidoctor/document.rb)
/home/mogztter/.rvm/gems/ruby-1.9.3-p429/gems/opal-0.4.4/lib/opal/lexer.rb:40:in `on_error'
(eval):3:in `_racc_do_parse_c'
(eval):3:in `do_parse'
/home/mogztter/.rvm/gems/ruby-1.9.3-p429/gems/opal-0.4.4/lib/opal/lexer.rb:33:in `parse'
/home/mogztter/.rvm/gems/ruby-1.9.3-p429/gems/opal-0.4.4/lib/opal/parser.rb:76:in `parse'
/home/mogztter/.rvm/gems/ruby-1.9.3-p429/gems/opal-0.4.4/lib/opal/require_parser.rb:17:in `parse'
/home/mogztter/.rvm/gems/ruby-1.9.3-p429/gems/opal-sprockets-0.2.0/lib/opal/sprockets/processor.rb:73:in `evaluate'

By "upstream for 1.5.0" you mean 0.1.5 ? or are you planning to release Asciidoctor 1.0.0 anytime soon ? ;)
Can I start sending PR with my changes to Asciidoctor upstream ?

Thanks,
Guillaume.