-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
use of a valid ruby extension but failure to generate the pdf file #1559
Comments
Given my limited understanding of Ruby, the extension you're adding expects that the PDF support for AsciiDoc is loaded, and it will fail if that PDF support is not available. The behavior might have changed with an upgrade of the AsciiDoc plugin which might have happened automatically when you upgraded PhpStorm. The AsciIDoc plugin for IntelliJ will only load the PDF support when you ask it to render a PDF, and will not load the PDF support when it renders the regular preview. With some trial-and-error, I updated the code to use a replacement for the non-existing PDF converter when generating the preview. Now the preview renders normally. There might be better ways to do this, maybe a Ruby expert can comment here. The generating of a PDF works as well. As I'm lacking a full example, I wasn't able to generate your PDF with the specific setup you are using, so I don't know if the output still looks like you expect. Please let me know if this is helpful.
|
You would never want to register the PDF converter by extending the HTML converter. These two converters are not interchangeable. However, you could wrap the class definition in |
Thank you - this is obviously better. See below for the complete source code snippet for future reference. I'm closing this issue as the question has been answerd.
|
Hello,
Observed vs. expected behavior
I'm trying to use the extension described here https://docs.asciidoctor.org/pdf-converter/latest/extend/use-cases/#theme-table-using-roles.
I placed the extension in
.asciidocotor/lib/TableRole.rb
at the root of the project.When I preview it, I get the following error:
I tried adding the following line to the beginning of the ruby file:
In this case the preview works but generating the pdf fails with the plugin button.
I manage to get the preview and pdf generation to work without using the "require" line and by writing the following inheritance:
PDFConverterTableRole class < Asciidoctor::Converter::Base
.Until yesterday (version 2023.2.3 Phpstorm), this worked. Since the update to 2023.2.5, it no longer works.
Environment
Asciidoc plugin version: 0.40.9
IDE details : PhpStorm 2023.2.5
Build #PS-232.10300.41, built on 14 February 2024
Under license ***
Subscription is active until 20 November 2024.
Runtime version: 17.0.10+7-b1000.48 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4082M
Cores: 20
Registry :
ide.intellij.laf.enable.animation=true
debugger.new.tool.window.layout=true
run.processes.with.pty=TRUE
ide.experimental.ui=true
ide.balloon.shadow.size=0
Ungrouped plugins :
com.mallowigi.idea (22.0.0)
com.intellij.ideolog (222.3.2.0)
com.markskelton.one-dark-theme (5.10.0)
com.intellij.properties (232.8660.88)
String Manipulation (9.12.0)
Key Promoter X (2023.3.0)
com.github.gitofleonardo.simplesqlitebrowser (1.0.7)
com.intellij.plugin.adernov.powershell (2.3.1)
PlantUML integration (7.7.0-IJ2023.2)
org.asciidoctor.intellij.asciidoc (0.40.9)
com.jetbrains.lang.ejs (232.8660.142)
mobi.hsz.idea.gitignore (4.5.2)
com.intellij.plugins.html.instantEditing (232.8660.142)
izhangzhihao.rainbow.brackets (2023.3.7)
com.kalessil.phpStorm.phpInspectionsEA (5.0.0.0)
com.github.ArtsiomCh.NestedBracketsColorer (0.
The text was updated successfully, but these errors were encountered: