Bulk Extension Registration (Extension Groups)

As an alternative method to register extensions in bulk or groups. Using the ExtensionGroup API it is possible to define a set of extension grouped under a name to be registered later.

final String groupName = "my-extensions";
ExtensionGroup extensionGroup = asciidoctor.createGroup(groupName)
        .postprocessor(ByePostprocessor.class);       (1)


extensionGroup.register();                            (2)
1 Multiple extensions can be added together using the fluent API.
2 Complete registration, otherwise extensions won’t be enabled.

If you don’t need or want to set a specific name, you can just use asciidoctor.createGroup(), and a randomly generated name will be assigned automatically.

Calling createGroup(String) + register() more than once will override any pre-existing group with the same name. Effectively REMOVING (and disabling) the previously set extensions.

This does not apply to createGroup(), different calls will create different extension groups with random names.