Open gtoast opened 6 years ago
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 ''', [:])
Thank you for finding this! Would you like to submit a pull request?
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: