All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rmannibucau.asciidoctor.backend.DocumentVisitor Maven / Gradle / Ivy

package com.github.rmannibucau.asciidoctor.backend;

import java.util.Map;
import java.util.function.Function;
import java.util.function.Supplier;

import org.asciidoctor.ast.Block;
import org.asciidoctor.ast.Cell;
import org.asciidoctor.ast.DescriptionList;
import org.asciidoctor.ast.Document;
import org.asciidoctor.ast.List;
import org.asciidoctor.ast.Section;
import org.asciidoctor.ast.Table;

public interface DocumentVisitor {
    String onDocument(Document document, String transform, Map opts,
                      Supplier contentSupplier);

    String onSection(Section section, String transform, Map opts,
                     Supplier contentSupplier);

    String onListing(Block block, String transform, Map opts,
                     Supplier contentSupplier);

    String onPreamble(Block block, String transform, Map opts,
                      Supplier contentSupplier);

    String onParagraph(Block block, String transform, Map opts,
                       Supplier contentSupplier);

    String onImage(Block block, String transform, Map opts,
                   String alt, String path);

    String onAdmonition(Block block, String transform, Map opts,
                        String label, Supplier contentSupplier);

    String onDescriptionList(DescriptionList list, String transform, Map opts);

    String onList(List list, String transform, Map opts);

    String onMonospaced(String value);

    String onStrong(String value);

    String onEmphasis(String value);

    String onXref(String value, String title);

    String onLink(String value);

    String onTable(Table table, String transform, Map opts,
                   Function cellConverter);

    String onPassthrough(Block block, String transform, Map opts, Supplier contentSupplier);

    String onQuote(Block block, String transform, Map opts, Supplier contentSupplier);

    default String transformRawContent(final String value) {
        return value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy