-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The version number declared in the Quickstart code isn't valid. Running it throws an error about asciidoctorj-groovy-dsl being an "unresolved dependency". Here's a corrected version of the code, using the latest version of the dsl:
@GrabConfig(systemClassLoader=true)
@Grab(group='org.asciidoctor', module='asciidoctorj-groovy-dsl', version='1.6.0-alpha.1')
import org.asciidoctor.groovydsl.AsciidoctorExtensions
import org.asciidoctor.Asciidoctor
AsciidoctorExtensions.extensions{
block(name: 'BIG', contexts: [':paragraph']) {
parent, reader, attributes ->
def upperLines = reader.readLines()
.collect {it.toUpperCase()}
.inject('') {a, b -> a + '\n' + b}
createBlock(parent, 'paragraph', [upperLines], attributes, [:])
}
}
Asciidoctor.Factory.create().render('''
[BIG]
Hello World
''', [:])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels