File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
grails-docs/src/main/groovy/grails/doc/asciidoc Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import grails.doc.DocEngine
44import groovy.transform.InheritConstructors
55import org.asciidoctor.Options
66import org.asciidoctor.OptionsBuilder
7+ import org.asciidoctor.SafeMode
78import org.radeox.api.engine.context.RenderContext
89
910import static org.asciidoctor.Asciidoctor.Factory.create;
@@ -24,12 +25,14 @@ class AsciiDocEngine extends DocEngine {
2425 ]
2526 @Override
2627 String render (String content , RenderContext context ) {
28+ def optionsBuilder = OptionsBuilder . options()
29+ .headerFooter(false )
30+ .attributes(attributes)
31+ if (attributes. containsKey(' safe' )) {
32+ optionsBuilder. safe(SafeMode . valueOf(attributes. get(' safe' ). toString()))
33+ }
2734 asciidoctor. convert(content,
28- new OptionsBuilder ()
29- .headerFooter(false )
30- .attributes(
31- attributes
32- )
35+ optionsBuilder
3336 .get()
3437 )
3538 }
You can’t perform that action at this time.
0 commit comments