-
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?
Conversation
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.
LGTM, though I don't think using wildcard for imports will make it.
import io.quarkus.qute.SectionHelperFactory; | ||
import io.quarkus.qute.SingleResultNode; | ||
import io.quarkus.qute.TemplateExtension; | ||
import io.quarkus.qute.*; |
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.
@@ -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 comment
The 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 {text.asciidocToHtml}
in a way that it corresponds to {text.asciidocToHtml.raw}
. Which is probably ok, unless someone wants to escape the result of conversion... which probably does not make a lot of sense, right?
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.
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.
It may be still be of some use to be able to pass attributes to the section but this would be a good start.
Fixes #146