From cf173715c28c6ac820df44009dd5bc3222af46fb Mon Sep 17 00:00:00 2001 From: ulrich Date: Sun, 10 Nov 2024 16:14:57 +0000 Subject: [PATCH] an AsciidoctorJ Version 3 angepasst --- src/de/uhilger/neon/adoc/AdocFilter.java | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/de/uhilger/neon/adoc/AdocFilter.java b/src/de/uhilger/neon/adoc/AdocFilter.java index c0cca3b..f02a607 100644 --- a/src/de/uhilger/neon/adoc/AdocFilter.java +++ b/src/de/uhilger/neon/adoc/AdocFilter.java @@ -38,13 +38,11 @@ @Override public void doFilter(HttpExchange exchange, Chain chain) throws IOException { URI uri = exchange.getRequestURI(); - //String path = uri.getPath(); try { - String path = new HttpHelper().getFileName(exchange); - if(path.endsWith(".adoc")) { + String fileName = new HttpHelper().getFileName(exchange); + if(fileName.endsWith(".adoc")) { HttpContext ctx = exchange.getHttpContext(); String fileBase = ctx.getAttributes().get(FileServer.ATTR_FILE_BASE).toString(); - String fileName = path.substring(ctx.getPath().length()); String query = uri.getQuery(); if (query instanceof String && query.contains("pdf=true")) { processAdocFile(new File(fileBase, fileName), true); -- Gitblit v1.9.3