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
2
2
3
3
import grails.doc.DocEngine
4
4
import groovy.transform.InheritConstructors
5
+ import org.asciidoctor.Attributes
5
6
import org.asciidoctor.Options
6
- import org.asciidoctor.OptionsBuilder
7
7
import org.asciidoctor.SafeMode
8
8
import org.radeox.api.engine.context.RenderContext
9
9
@@ -25,16 +25,16 @@ class AsciiDocEngine extends DocEngine {
25
25
]
26
26
@Override
27
27
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' )) {
32
36
optionsBuilder. safe(SafeMode . valueOf(attributes. get(' safe' ). toString()))
33
37
}
34
- asciidoctor. convert(content,
35
- optionsBuilder
36
- .get()
37
- )
38
+ asciidoctor. convert(content, optionsBuilder. build())
38
39
}
39
-
40
40
}
You can’t perform that action at this time.
0 commit comments