diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 3a80bb51f..0469fc231 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -10,6 +10,7 @@ This document provides a high-level view of the changes introduced by release. === 0.43.5 - Update docs and templates to recommend an absolute path for the `pdf-themesdir` (#1750) +- When rendering the preview for Antora, automatically switch to highlight.js syntax highlighting (#1736) === 0.43.4 diff --git a/src/main/java/org/asciidoc/intellij/AsciiDocWrapper.java b/src/main/java/org/asciidoc/intellij/AsciiDocWrapper.java index 441f821a8..a4f6681df 100644 --- a/src/main/java/org/asciidoc/intellij/AsciiDocWrapper.java +++ b/src/main/java/org/asciidoc/intellij/AsciiDocWrapper.java @@ -1051,6 +1051,9 @@ public static Collection populateAntoraAttributes(@NotNull antoraModuleDir) { Collection result = new ArrayList<>(); if (antoraModuleDir != null) { + // Antora uses hightlight.js as the default. Making it soft-set so it can be overwritten when needed + result.add(new AsciiDocAttributeDeclarationDummy("source-highlighter", "highlight.js", true)); + result.addAll(collectAntoraAttributes(antoraModuleDir, project)); VirtualFile baseDir = LocalFileSystem.getInstance().findFileByIoFile(fileBaseDir);