-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix RawString issue with Asciidoc and Markdown template extensions #149
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,7 @@ | |
import java.util.List; | ||
import java.util.concurrent.CompletionStage; | ||
|
||
import io.quarkus.qute.CompletedStage; | ||
import io.quarkus.qute.EngineConfiguration; | ||
import io.quarkus.qute.ResultNode; | ||
import io.quarkus.qute.SectionHelper; | ||
import io.quarkus.qute.SectionHelperFactory; | ||
import io.quarkus.qute.SingleResultNode; | ||
import io.quarkus.qute.TemplateExtension; | ||
import io.quarkus.qute.*; | ||
|
||
@EngineConfiguration | ||
public class AsciidocSectionHelperFactory | ||
|
@@ -29,8 +23,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) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does it fix the problem with section params in #146? IIUIC this merely changes the behavior of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I was trying to achieve with an attribute was to prevent the the rendered content of beeing escaped. So if we have another to achieve the same it's fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes that's why we make it the default behaviour, it doesn't make sense to use it escaped.. |
||
return new RawString(CONVERTER.apply(text)); | ||
} | ||
|
||
public static class AsciidocSectionHelper implements SectionHelper { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls don't use wildcards for imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix it tomoz