-
-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception in prawn when generating a PDF from IDE #337
Comments
FYI there were known issues in beta.4 with the processing of verbatim
blocks. Should be gone in beta.5.
|
@mojavelinux - it is happening with asciidoctorj-pdf beta.5. Something in prawn. I copy the JRuby stack trace here. Wasn't able to reproduce it on the command line, but the JRuby command line seems to use a different version. Seems to happen once the verbatim content has an automatic line break, but not without the line break. I'm about to create a minimal test case for it.
|
It seems like this should be an Asciidoctor PDF issue. I looked at the offending line and I can't see how that would fail. I'll definitely be interested in seeing the test case. |
For the moment it only appears within IntelliJ, not with any test case outside of it. Once I found out how to reproduce it and we can narrow down the source, we can move the issue. |
I tried it with Asciidoctor PDF using JRuby and with AsciidoctorJ PDF and I don't get a failure in either case. |
Tracing the error down to the line where it happend, I see that the assert has changed in the latest version of JRuby 9.2.8.0 - see jruby/jruby@43a760d#diff-a5f421af42e54a570765fce7f7504579 - see jruby/jruby#5693. Apparently IntelliJ has asserts enabled when running the IDE. Although I wasn't able to write a test case to show it stand alone, it fixes the exception occuring in the IDE. I'll see if upgrading JRuby introduces other problems. If it works well, I'll open a PR with AsciidoctorJ next week. |
@gudaoxuri - I managed to trace down the AssertionError to an issue that was fixed in the latest JRuby release. I've updated the JRuby version included in the plugin and created a new pre-release 0.30.8. Note: this doesn't relate to the fonts in the PDF. To get CN fonts in the PDF you'll need to specify a theme. The new pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository. Please give it a try and report problems either in this issue or new issues. |
Wonderful, thanks. |
It looking at the exception, it looks like an issue with prawn and syntax highlighting:
prawn.text.formatted.wrap
I locked the trigger down to the quick-start.adoc file and reduced it to the following snippet that fails with the PDF generation in the IDE.
The project you referenced doesn't include a PDF generation, therefore I am not sure what versions you use to create a PDF.
The IntelliJ plugin uses asciidoctorj-pdf:1.5.0-beta.4 together with the latest AsciiDoctorJ runtime.
Please use the latest versions of asciidoctorj and asciidoctorj-pdf in your maven build. If you see the same problem there, please raise an issue with asciidoctor-pdf with a minimal example (usually not asciidoctorj-pdf, as this is just a re-packaging).
Once you have a working Maven build with the latest versions and still have a failing IntelliJ plugin, please raise an issue with the plugin.
Originally posted by @ahus1 in #325 (comment)
The text was updated successfully, but these errors were encountered: