From c5090aa6feeebd449f8b805d617f240470d92a95 Mon Sep 17 00:00:00 2001
From: ulrich@undisclosed
Date: Fri, 01 May 2020 08:10:12 +0000
Subject: [PATCH] Source Highlighter berichtigt

---
 src/de/uhilger/wbx/web/AdocServlet.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/de/uhilger/wbx/web/AdocServlet.java b/src/de/uhilger/wbx/web/AdocServlet.java
index 68a0eaa..af4736b 100644
--- a/src/de/uhilger/wbx/web/AdocServlet.java
+++ b/src/de/uhilger/wbx/web/AdocServlet.java
@@ -33,6 +33,8 @@
 
 import static org.asciidoctor.Asciidoctor.Factory.create;
 import org.asciidoctor.Asciidoctor;
+import static org.asciidoctor.AttributesBuilder.attributes;
+import static org.asciidoctor.OptionsBuilder.options;
 
 
 
@@ -124,9 +126,10 @@
    * nach PDF transformiert werden soll
    */
   private void transform(String fileName, String backend) {    
+    /*
     Map<String, Object> attributes = new HashMap<>();
     attributes.put("no_footer", false);
-    attributes.put("source_highlighter", "highlightjs");
+    //attributes.put("source_highlighter", "highlightjs");
 
     Map<String, Object> options = new HashMap<>();
     options.put("attributes", attributes); 
@@ -134,6 +137,13 @@
     if(null != backend) {
       options.put("backend", backend);
     }
+    */
+    
+    Map<String, Object> attributes = attributes().sourceHighlighter("highlightjs")
+                                       .asMap();
+    Map<String, Object> options = options().inPlace(false).attributes(attributes)
+                                       .asMap();
+
     
     Asciidoctor asciidoctor = create();    
     asciidoctor.convertFile(new File(fileName), options);    

--
Gitblit v1.9.3