Skip to content

Commit

Permalink
Bump org.asciidoctor:asciidoctorj from 2.5.13 to 3.0.0
Browse files Browse the repository at this point in the history
Bumps [org.asciidoctor:asciidoctorj](https://github.com/asciidoctor/asciidoctorj) from 2.5.13 to 3.0.0.
- [Release notes](https://github.com/asciidoctor/asciidoctorj/releases)
- [Changelog](https://github.com/asciidoctor/asciidoctorj/blob/main/CHANGELOG.adoc)
- [Commits](asciidoctor/asciidoctorj@v2.5.13...v3.0.0)

---
updated-dependencies:
- dependency-name: org.asciidoctor:asciidoctorj
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and ahus1 committed Sep 8, 2024
1 parent a0da379 commit 454b855
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies {
* https://github.com/asciidoctor/asciidoctorj-pdf/issues/25
*/
implementation("org.snakeyaml:snakeyaml-engine:2.7")
implementation("org.asciidoctor:asciidoctorj:2.5.13") // WARNING: when upgrading asciidoctorj, see comment above about snakeyaml!
implementation("org.asciidoctor:asciidoctorj:3.0.0") // WARNING: when upgrading asciidoctorj, see comment above about snakeyaml!
implementation("commons-io:commons-io:2.16.1")
implementation("io.github.markdown-asciidoc:markdown-to-asciidoc:2.0.1") {
// Exclude the Kotlin dependency, as this plugin uses only the Java version of the converter.
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/org/asciidoc/intellij/AsciiDocWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ private static void handleAntoraYamlException(YAMLException ex, @Nullable String

public Options getExportOptions(Options options, FileType fileType) {
if (fileType == FileType.HTML || fileType == FileType.BROWSER || fileType == FileType.DOCX) {
options.setOption(Options.HEADER_FOOTER, true);
options.setOption(Options.STANDALONE, true);
}
return options;
}
Expand Down Expand Up @@ -1411,10 +1411,13 @@ private Options getDefaultOptions(FileType fileType, VirtualFile

settings.getAsciiDocPreviewSettings().getAttributes().forEach(attrs::setAttribute);

OptionsBuilder opts = Options.builder().safe(settings.getSafe(project)).backend(fileType.backend).headerFooter(false)
OptionsBuilder opts = Options.builder().safe(settings.getSafe(project)).backend(fileType.backend).standalone(false)
.attributes(attrs)
.option("sourcemap", "true")
.baseDir(fileBaseDir);
.option("sourcemap", "true");

if (fileBaseDir != null && fileBaseDir.exists()) {
opts = opts.baseDir(fileBaseDir);
}

return opts.build();
}
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/org/asciidoc/intellij/asciidoc/PrependConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.asciidoctor.ast.Document;
import org.asciidoctor.extension.Preprocessor;
import org.asciidoctor.extension.PreprocessorReader;
import org.asciidoctor.extension.Reader;

import java.util.Collections;

Expand All @@ -17,11 +18,12 @@ public class PrependConfig extends Preprocessor {
private String config = "";

@Override
public void process(Document document, PreprocessorReader reader) {
if (config.length() != 0) {
// otherwise an empty line at the beginning breaks level 0 detection
reader.push_include(config, null, null, 1, Collections.emptyMap());
public Reader process(Document document, PreprocessorReader reader) {
if (!config.isEmpty()) {
// otherwise, an empty line at the beginning breaks level 0 detection
reader.pushInclude(config, null, null, 1, Collections.emptyMap());
}
return null;
}

public void setConfig(String config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ public class BrowserPanel implements Disposable {
@Nullable
private String myGoogleFontsCssLink;
@Nullable
private String myDroidSansMonoCssLink;
@Nullable
private String myMermaidScript;
@Nullable
private String myAsciidoctorTabsScript;
Expand Down Expand Up @@ -145,7 +143,6 @@ public BrowserPanel() {
myFontAwesomeCssLink = "<link rel=\"stylesheet\" data-default href=\"" + PreviewStaticServer.getStyleUrl("font-awesome/css/font-awesome.min.css") + "\">";
myDejavuCssLink = "<link rel=\"stylesheet\" data-default href=\"" + PreviewStaticServer.getStyleUrl("dejavu/dejavu.css") + "\">";
myGoogleFontsCssLink = "<link rel=\"stylesheet\" data-default href=\"" + PreviewStaticServer.getStyleUrl("googlefonts/googlefonts.css") + "\">";
myDroidSansMonoCssLink = "<link rel=\"stylesheet\" data-default href=\"" + PreviewStaticServer.getStyleUrl("googlefonts/droidsansmono.css") + "\">";
myMermaidScript = "<script src=\"" + PreviewStaticServer.getScriptUrl("mermaid/mermaid.min.js") + "\"></script>" +
"<script>mermaid.initialize(); window.mermaid = mermaid; </script>";
myAsciidoctorTabsScript = "<script src=\"" + PreviewStaticServer.getScriptUrl("tabs.js") + "\"></script>";
Expand Down

0 comments on commit 454b855

Please sign in to comment.