Class NamedEntityExtension.Builder

java.lang.Object
org.ctan.markup.gfm.ext.NamedEntityExtension.Builder
Enclosing class:
NamedEntityExtension

public static final class NamedEntityExtension.Builder extends Object
The class Builder contains the builder.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public NamedEntityExtension build()
      The method build starts the building process.
      Returns:
      the entity
    • entities

      public NamedEntityExtension.Builder entities(Map<String,String> entities)
      Registers multiple entities at once from the supplied map.
      Parameters:
      entities - map of entity name to HTML replacement
      Returns:
      this builder for chaining
    • entity

      public NamedEntityExtension.Builder entity(String name, String html)
      Registers a named entity and its HTML replacement.
      Parameters:
      name - the entity name without & / ; (e.g. "TeX")
      html - the raw HTML to emit instead (e.g. a <span> tree)
      Returns:
      this builder for chaining
    • replaceLogoText

      public NamedEntityExtension.Builder replaceLogoText(boolean replace)
      When set to true, plain-text occurrences of registered logo names (e.g. a bare LaTeX in a paragraph) are also replaced with the configured HTML, as if the author had written &LaTeX;. Text inside code spans and code blocks is never affected.

      Defaults to false.

      Parameters:
      replace - true to enable plain-text replacement
      Returns:
      this builder for chaining