AsciiDoc support for Visual Studio Code using Asciidoctor
Released by: @ggrossetie
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.1.4...v3.1.5
Released by: @ggrossetie
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.1.3...v3.1.4
imagesdir
attribute (#759)getContent
call after generating the document header (#762)imagesdir
attribute from image paths when drag and dropping images in the editor (#761)Released by: @ggrossetie
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.1.2...v3.1.3
textDocument.lineAt
to avoid issues with line separators discrepancy (#750)Released by: @ggrossetie
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.1.1...v3.1.2
This release is a major step forward!
We've decided to remove Asciidoctor CLI support in order to provide a better experience and reduce the maintenance burden. This change has allowed us to restructure the extension and implement new features.
One major change is that the preview now generates a complete HTML document that's perfectly suited for a Webview. For instance, we were relying on CDN to provide STEM support (MathJax), icons (FontAwesome) and fonts (Google Fonts) but now everything is included in the extension. The preview will work just as well even if your are offline! Another benefit is that we can implement a custom logic on how external resources are resolved. The AsciiDoc extension should now seamlessly resolve stylesheets from an URL or a local path.
This version also introduces support for code folding on sections, conditional blocks, open blocks and comments:
Extensions are central to the success of AsciiDoc because they open up the language to new use cases. This new release allows to register and load custom Asciidoctor.js extensions from the .asciidoctor/lib directory. Here's an example using the Asciidoctor Emoji extension:
Settings are now organized by section (Preview, PDF, Extensions, General, Debug) and we applied a naming convention to make sure that every setting name is consistent.
As a result, we've deprecated a few settings. If you are using a deprecated setting, a deprecation message will show and help you to migrate:
We took the opportunity to make a few enhancements. For instance, you can now configure a list of command line arguments for wkhtmltopdf
:
As you can see on the screenshot above, we are also using Markdown description to improve readability.
To make it easier to get started, the VS Code extension will offer to install Asciidoctor PDF if asciidoctor-pdf
is not available on your PATH
but bundle
is!
Regarding wkhtmltopdf
, since we were using an outdated version, we've removed the option to install it. Instead, we recommend to download and install the latest version from https://wkhtmltopdf.org/downloads.html
The VS Code extension is now also available in French 🇫🇷 and Japanese 🇯🇵 (thanks to @YoshihideShirai)
Last but not least, this release includes contributions from 6 new contributors and quite a few bug fixes!
NOTE: If you want to keep using asciidoctor
CLI, it's possible to setup a similar workflow using both the HTML Preview and Run on Save extensions using the following settings.json
:
{
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.adoc$",
"cmd": "asciidoctor ${file}"
},
]
}
}
You can also setup a workflow outside of VS Code that relies on the asciidoctor
CLI.
pdf-themesdir
is now relative to the working directory (i.e., workspace folder) not relative to the document (#703)stylesdir
and stylesheet
attributes are now ignored in the preview. Instead, you should define asciidoc.preview.style
.
Please note that when exporting to HTML, stylesdir
and stylesheet
will be used and should be defined in an .asciidoctorconfig
file.NOTE: We strongly recommend to use .asciidoctorconfig
file to define common attributes.
This file will be used in the preview and when exporting to HTML and PDF (using asciidoctor-pdf
).
asciidoc.extensions.enableKroki
is now disabled by default. If you are using diagrams you will need to enable this setting explicitly..asciidoctorconfig
and .asciidoctorconfig.adoc
by @apupier, @mogztter and @ahus1 (#380)basebackend
and outfilesuffix
on the WebView converter otherwise Docinfo are not correctly included (#522):
is at the start of the line by @Mogztter (https://github.com/asciidoctor/asciidoctor-vscode/pull/529)--footer-center
option to wkthtmltopdf
by @gurbindersingh (#526)asciidoctor-pdf
and/or bundler
are available in the PATH
asciidoctor-pdf
and/or bundler
are available in the PATH
.md
by .adoc
)fsPath
otherwise Node require doesn't work on Windows) https://github.com/asciidoctor/asciidoctor-vscode/pull/630
supports_templates
as attribute otherwise backendTraits
overrides other values, as a result syntax highlighting wasn't working anymore! (#666)copycss
by @Mogztter (https://github.com/asciidoctor/asciidoctor-vscode/pull/538)Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v2.9.8...v3.1.0
Released by: @ggrossetie
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.0.5...v3.0.6
pdf-themesdir
is now relative to the working directory (i.e., workspace folder) not relative to the document (#703)stylesdir
and stylesheet
attributes are now ignored in the preview. Instead, you should define asciidoc.preview.style
.
Please note that when exporting to HTML, stylesdir
and stylesheet
will be used and should be defined in an .asciidoctorconfig
file.NOTE: We strongly recommend to use .asciidoctorconfig
file to define common attributes.
This file will be used in the preview and when exporting to HTML and PDF (using asciidoctor-pdf
).
Released by: @ggrossetie
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.0.4...v3.0.5
supports_templates
as attribute otherwise backendTraits
overrides other values, as a result syntax highlighting wasn't working anymore! (#666)Released by: @Mogztter
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.0.2...v3.0.3
.asciidoctorconfig
and .asciidoctorconfig.adoc
by @apupier, @mogztter and @ahus1 (#380)asciidoctor-pdf
and/or bundler
are available in the PATH
.md
by .adoc
)fsPath
otherwise Node require doesn't work on Windows) https://github.com/asciidoctor/asciidoctor-vscode/pull/630
Released by: @Mogztter
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.0.1...v3.0.2
This is a bug fixes release following 3.0.0 release.
asciidoctor-pdf
and/or bundler
are available in the PATH
Released by: @Mogztter
Full Changelog: https://github.com/asciidoctor/asciidoctor-vscode/compare/v3.0.0...v3.0.1