Closed SandMann1 closed 6 years ago
Hi, thanks for reporting the problem, can you please provide a zip file with a sample .adoc and the css structure ?
Thanks
Attached is a .zip with an example. In the styles catalog you will find the coderay css. In the bin catalog you can see an example of the finished build using asciidoctor and coderay gems.
As you can see I use a setup file in the beginning. This adoc I reuse across all documents and it is always included in the beginning of my documents. As I mentioned earlier, the main issue is that nothing previews. If you can make the syntax highlighter work in preview - great, but if the source blocks just renders genericly thats no problem.
Simply removing this line
:source-highlighter: coderay
from the setup.adoc resolves the problem for preview but breakes my beutiful codeblocks in the end result.
Perhaps it is possible to just ignore this attribute before rendering?
@SandMann1, in a recent version of the extension the default asciidoc renger engine was changed from Asciidoctor (Ruby) to Asciidoctor(.JS), there are multiple source highlighters, but they only work on specific engines, you can find the list at: https://asciidoctor.org/docs/user-manual/#enabling-source-highlighting You have the following options:
"AsciiDoc.asciidoctor_command": "asciidoctor -r asciidoctor-diagram -o-",
"AsciiDoc.use_asciidoctor_js": false,
@SandMann1 not sure if you need the diagram extension. You can remove the-r asciidoctor-diagram
.
Thank you for excellent and quick response. - SandMan
My asciidocs use coderay as source code highlighter. It has its own css. Untill recently this did not affect the preview, but now the preview fails showing error message:
Any way to tell the preview where to find the css or bypass this issue? We would be happy if the rest of the text would preview.