Skip to content

Allow generic extensions #70

@rockyallen

Description

@rockyallen

Use case:
I want to use this to add multiple extensions that may be of different types, and that work together at the instance level, and to use Ant to configure them.

Could this be added to asciidoctor-ant?

Something like:

GenericExtension.java:

GenericExtension { public registerExtensions(javaExtensionRegistry); }

AsciidoctorAntTask.java:

List<GenericExtension> GenericExtensions;
addConfigured (GenericExtension es) { GenericExtensions.add(es); }

execute() { for GenericExtension ge: GenericExtensions} {
  ge.registerExtensions(javaExtensionRegistry); 
...

Which would let me write:
build.xml:

<asciidoctor:convert>
....
<referencesextension database="" style="ieee"/>
</asciidoctor:convert>

ReferencesExtension.java:

ReferencesExtension extends GenericExtension { 
public void setDatabase() {}
public registerExtensions(javaExtensionRegistry) {}
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions