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

org.pkl.thirdparty.commonmark.renderer.html.AttributeProvider Maven / Gradle / Ivy

Go to download

Fat Jar containing pkl-cli, pkl-codegen-java, pkl-codegen-kotlin, pkl-config-java, pkl-core, pkl-doc, and their shaded third-party dependencies.

There is a newer version: 0.27.1
Show newest version
package org.pkl.thirdparty.commonmark.renderer.html;

import org.pkl.thirdparty.commonmark.node.Node;

import java.util.Map;

/**
 * Extension point for adding/changing attributes on HTML tags for a node.
 */
public interface AttributeProvider {

    /**
     * Set the attributes for a HTML tag of the specified node by modifying the provided map.
     * 

* This allows to change or even remove default attributes. With great power comes great responsibility. *

* The attribute key and values will be escaped (preserving character entities), so don't escape them here, * otherwise they will be double-escaped. *

* This method may be called multiple times for the same node, if the node is rendered using multiple nested * tags (e.g. code blocks). * * @param node the node to set attributes for * @param tagName the HTML tag name that these attributes are for (e.g. {@code h1}, {@code pre}, {@code code}). * @param attributes the attributes, with any default attributes already set in the map */ void setAttributes(Node node, String tagName, Map attributes); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy