asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
50 stars 45 forks source link

Syntax error since 0.3.3 #86

Closed Flast closed 4 years ago

Flast commented 4 years ago

I got following error since 0.3.3; 0.3.2 was worked well. I think it was introduced by #85 .

root@****:~# asciidoctor-pdf  -r asciidoctor-pdf-cjk -r asciidoctor-mathematical ****.adoc
/root/.gem/ruby/2.5.0/gems/asciidoctor-mathematical-0.3.3/lib/asciidoctor-mathematical.rb:1:in `require_relative': /root/.gem/ruby/2.5.0/gems/asciidoctor-mathematical-0.3.3/lib/asciidoctor-mathematical/extension.rb:156: syntax error, unexpected tSTRING_BEG, expecting keyword_then or ';' or '\n' (SyntaxError)
... text != nil && text.include? ':'
...                              ^
/root/.gem/ruby/2.5.0/gems/asciidoctor-mathematical-0.3.3/lib/asciidoctor-mathematical/extension.rb:185: syntax error, unexpected '}', expecting keyword_end
      }
      ^
/root/.gem/ruby/2.5.0/gems/asciidoctor-mathematical-0.3.3/lib/asciidoctor-mathematical/extension.rb:234: syntax error, unexpected keyword_end, expecting '}'
    from /root/.gem/ruby/2.5.0/gems/asciidoctor-mathematical-0.3.3/lib/asciidoctor-mathematical.rb:1:in `<top (required)>'
    from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    from /root/.gem/ruby/2.5.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /root/.gem/ruby/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/options.rb:276:in `block in parse!'
    from /root/.gem/ruby/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/options.rb:274:in `each'
    from /root/.gem/ruby/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/options.rb:274:in `parse!'
    from /root/.gem/ruby/2.5.0/gems/asciidoctor-pdf-1.5.0.alpha.18/bin/asciidoctor-pdf:25:in `<top (required)>'
    from /root/.gem/ruby/2.5.0/bin/asciidoctor-pdf:23:in `load'
    from /root/.gem/ruby/2.5.0/bin/asciidoctor-pdf:23:in `<main>'

Gem list which I installed to run asciidoctor:

Successfully installed ttfunk-1.5.1
Successfully installed asciidoctor-2.0.10
Successfully installed pdf-core-0.7.0
Successfully installed prawn-2.2.2
Successfully installed prawn-table-0.2.2
Successfully installed Ascii85-1.0.3
Successfully installed ruby-rc4-0.1.5
Successfully installed hashery-2.1.2
Successfully installed afm-0.2.2
Successfully installed pdf-reader-2.4.0
Successfully installed prawn-templates-0.1.2
Successfully installed public_suffix-4.0.5
Successfully installed addressable-2.7.0
Successfully installed css_parser-1.7.1
Successfully installed prawn-svg-0.29.1
Successfully installed prawn-icon-2.3.0
Successfully installed safe_yaml-1.0.5
Successfully installed thread_safe-0.3.6
Successfully installed concurrent-ruby-1.1.6
Successfully installed polyglot-0.3.5
Successfully installed treetop-1.5.3
Successfully installed asciidoctor-pdf-1.5.0.alpha.18
Successfully installed asciidoctor-pdf-cjk-0.1.3

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

If you are upgrading your Rails application from an older version of Rails:

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

If you are starting a NEW Rails application, you can ignore this notice.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

Successfully installed i18n-1.8.3
Successfully installed ruby-enum-0.8.0
Building native extensions. This could take a while...
Successfully installed mathematical-1.6.13
Successfully installed asciimath-2.0.1
Successfully installed asciidoctor-mathematical-0.3.3

Environment:

root@****:~# uname -a
Linux **** 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root@****:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:   bionic
root@ga3:~# ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
JanFeld commented 4 years ago

Same here on Arch Linux.

5.7.7-arch1-1 x86_64
Asciidoctor PDF 1.5.3 using Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)