File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
grails-docs/src/main/groovy/grails/doc/asciidoc Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ package grails.doc.asciidoc
22
33import grails.doc.DocEngine
44import groovy.transform.InheritConstructors
5+ import org.asciidoctor.Attributes
56import org.asciidoctor.Options
6- import org.asciidoctor.OptionsBuilder
77import org.asciidoctor.SafeMode
88import org.radeox.api.engine.context.RenderContext
99
@@ -25,16 +25,16 @@ class AsciiDocEngine extends DocEngine {
2525 ]
2626 @Override
2727 String render (String content , RenderContext context ) {
28- def optionsBuilder = OptionsBuilder . options()
29- .headerFooter(false )
30- .attributes(attributes)
31- if (attributes. containsKey(' safe' )) {
28+ def optionsBuilder = Options . builder()
29+ .standalone(false )
30+ .attributes(Attributes . builder()
31+ .imagesDir(attributes[' imagesdir' ])
32+ .sourceHighlighter(attributes[ ' source-highlighter' ])
33+ .icons(' icons' ). build())
34+
35+ if (attributes. containsKey(' safe' )) {
3236 optionsBuilder. safe(SafeMode . valueOf(attributes. get(' safe' ). toString()))
3337 }
34- asciidoctor. convert(content,
35- optionsBuilder
36- .get()
37- )
38+ asciidoctor. convert(content, optionsBuilder. build())
3839 }
39-
4040}
You can’t perform that action at this time.
0 commit comments