Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Actually I'm using the gradle-asciidoctor-plugin, I had the follow configuration:
asciidoctor { options = [ attributes : [ 'source-highlighter' : 'pygments' ] ] } And the error is: Caused by: org.jruby.exceptions.RaiseException: (NameError) undefined local variable or method `doc' for #<Asciidoctor::Converter::Html5Converter:0x52f558bf> at RUBY.document(jar:file:/Users/neodevelop/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj/1.5.0.preview.7/946801c962a23808795becce2f6a27f44674230c/asciidoctorj-1.5.0.preview.7.jar!/gems/asciidoctor-1.5.0.preview.7/lib/asciidoctor/converter/html5.rb:84) at RUBY.convert(jar:file:/Users/neodevelop/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj/1.5.0.preview.7/946801c962a23808795becce2f6a27f44674230c/asciidoctorj-1.5.0.preview.7.jar!/gems/asciidoctor-1.5.0.preview.7/lib/asciidoctor/converter/base.rb:26) at RUBY.convert(jar:file:/Users/neodevelop/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj/1.5.0.preview.7/946801c962a23808795becce2f6a27f44674230c/asciidoctorj-1.5.0.preview.7.jar!/gems/asciidoctor-1.5.0.preview.7/lib/asciidoctor/document.rb:895) at RUBY.convert(jar:file:/Users/neodevelop/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj/1.5.0.preview.7/946801c962a23808795becce2f6a27f44674230c/asciidoctorj-1.5.0.preview.7.jar!/gems/asciidoctor-1.5.0.preview.7/lib/asciidoctor.rb:1401) at RUBY.convert_file(jar:file:/Users/neodevelop/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj/1.5.0.preview.7/946801c962a23808795becce2f6a27f44674230c/asciidoctorj-1.5.0.preview.7.jar!/gems/asciidoctor-1.5.0.preview.7/lib/asciidoctor.rb:1470) at RUBY.convertFile(<script>:62) at org.jruby.gen.InterfaceImpl1738416336.convertFile(org/jruby/gen/InterfaceImpl1738416336.gen:13) at org.asciidoctor.gradle.AsciidoctorTask.processSingleFile(AsciidoctorTask.groovy:161) at org.asciidoctor.gradle.AsciidoctorTask.processSourceDir(AsciidoctorTask.groovy:146) at org.asciidoctor.gradle.AsciidoctorTask$_processDocumentsAndResources_closure2.doCall(AsciidoctorTask.groovy:126) at org.asciidoctor.gradle.AsciidoctorTask$_eachFileRecurse_closure5.doCall(AsciidoctorTask.groovy:174) at org.asciidoctor.gradle.AsciidoctorTask.eachFileRecurse(AsciidoctorTask.groovy:169) at org.asciidoctor.gradle.AsciidoctorTask.processDocumentsAndResources(AsciidoctorTask.groovy:125) at org.asciidoctor.gradle.AsciidoctorTask.processAsciidocSources(AsciidoctorTask.groovy:114) I have python and pygments installed, because I'm using the asciidoctor command directly and it's working correctly. Already I have installed the pygments.rb gem. Some ideas? Thanks and best regards! |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Now I remember that there was an error in pygments but I thought it was already fixed. When you are rendering document using CLI are you using Python implementation or Ruby implementation?
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
I'm using the ruby implementation: 'pygments.rb'. 2014-07-26 6:51 GMT-05:00 asotobu [via Asciidoctor :: Discussion] <[hidden email]>: Now I remember that there was an error in pygments but I thought it was already fixed. When you are rendering document using CLI are you using Python implementation or Ruby implementation? (¯`·._.·[Jµðn]·._.·´¯) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
In reply to this post by asotobu
Indeed, this was a bug in one of the 1.5.0 preview releases and has been fixed since. But you'll run into another problem. As far as I understand it, you can't use Pygments in AsciidoctorJ. The reason is because Pygments uses a interprocess communication bridge that we haven't been able to get working in the JVM environment. The best bet for right now is to use CodeRay (i.e., the "coderay" gem), which is integrated into Asciidoctor and AsciidoctorJ. CodeRay is very comparable to Pygments. The easiest way to support Pygments in AsciidoctorJ is to switch to Rouge...which is a port of Pygments to Ruby. There's an open issue for this integration here: https://github.com/asciidoctor/asciidoctor/issues/1040
Cheers, -Dan On Sat, Jul 26, 2014 at 4:51 AM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote: Now I remember that there was an error in pygments but I thought it was already fixed. When you are rendering document using CLI are you using Python implementation or Ruby implementation? Dan Allen | http://google.com/profiles/dan.j.allen
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
I had suspected something like that. I'll take a look and see if I can fix it through.
Thanks and best regards! 2014-07-28 12:37 GMT-05:00 mojavelinux [via Asciidoctor :: Discussion] <[hidden email]>:
... [show rest of quote] (¯`·._.·[Jµðn]·._.·´¯) |
Free forum by Nabble | Edit this page |