From e94aa8977aed0da24ddbb5f617145a405cba04cb Mon Sep 17 00:00:00 2001 From: Andy Damevin Date: Fri, 20 Dec 2024 10:40:11 +0100 Subject: [PATCH] Fix RawString issue with Asciidoc and Markdown template extensions --- .../web/asciidoc/runtime/AsciidocSectionHelperFactory.java | 5 +++-- .../web/markdown/runtime/MarkdownSectionHelperFactory.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/asciidoc/runtime/src/main/java/io/quarkiverse/qute/web/asciidoc/runtime/AsciidocSectionHelperFactory.java b/asciidoc/runtime/src/main/java/io/quarkiverse/qute/web/asciidoc/runtime/AsciidocSectionHelperFactory.java index 9509f129..1ce24ad1 100644 --- a/asciidoc/runtime/src/main/java/io/quarkiverse/qute/web/asciidoc/runtime/AsciidocSectionHelperFactory.java +++ b/asciidoc/runtime/src/main/java/io/quarkiverse/qute/web/asciidoc/runtime/AsciidocSectionHelperFactory.java @@ -5,6 +5,7 @@ import io.quarkus.qute.CompletedStage; import io.quarkus.qute.EngineConfiguration; +import io.quarkus.qute.RawString; import io.quarkus.qute.ResultNode; import io.quarkus.qute.SectionHelper; import io.quarkus.qute.SectionHelperFactory; @@ -29,8 +30,8 @@ public AsciidocSectionHelper initialize(SectionInitContext context) { } @TemplateExtension(matchNames = { "asciidocify", "asciidocToHtml" }) - static String convertToAsciidoc(String text, String ignoredName) { - return CONVERTER.apply(text); + static RawString convertToAsciidoc(String text, String ignoredName) { + return new RawString(CONVERTER.apply(text)); } public static class AsciidocSectionHelper implements SectionHelper { diff --git a/markdown/runtime/src/main/java/io/quarkiverse/qute/web/markdown/runtime/MarkdownSectionHelperFactory.java b/markdown/runtime/src/main/java/io/quarkiverse/qute/web/markdown/runtime/MarkdownSectionHelperFactory.java index 4b2461b5..8751b9bf 100644 --- a/markdown/runtime/src/main/java/io/quarkiverse/qute/web/markdown/runtime/MarkdownSectionHelperFactory.java +++ b/markdown/runtime/src/main/java/io/quarkiverse/qute/web/markdown/runtime/MarkdownSectionHelperFactory.java @@ -9,6 +9,7 @@ import io.quarkus.arc.impl.LazyValue; import io.quarkus.qute.CompletedStage; import io.quarkus.qute.EngineConfiguration; +import io.quarkus.qute.RawString; import io.quarkus.qute.ResultNode; import io.quarkus.qute.SectionHelper; import io.quarkus.qute.SectionHelperFactory; @@ -47,8 +48,8 @@ public MarkdownSectionHelper initialize(SectionInitContext context) { () -> Arc.container().instance(MdConverter.class).get()); @TemplateExtension(matchNames = { "markdownify", "mdToHtml" }) - static String convertToMarkdown(String text, String ignoredName) { - return CONVERTER.get().html(text); + static RawString convertToMarkdown(String text, String ignoredName) { + return new RawString(CONVERTER.get().html(text)); } public static class MarkdownSectionHelper implements SectionHelper {