Class Header


public class Header extends Structure

Represents a header in a markdown document. This will render the content in a large font, depending on the header size

Since:
0.0.12
Author:
Thomas Kwashnak
  • Constructor Details

    • Header

      public Header(Object content)
      Creates a new level-1 header
      Parameters:
      content - Content to display in the header
      Since:
      0.0.12
    • Header

      public Header(int level, Object content)

      Creates a new header of a specified level.

      Parameters:
      level - The header level to display. Can only be a number between 1-6
      content - The content to display in the header
      Throws:
      IllegalHeaderLevelException - if a level not within 1-6 is passed
      Since:
      0.0.12
  • Method Details

    • asString

      public String asString()
      Formats the element to a string
      Specified by:
      asString in class MarkdownElement
      Returns:
      String representation of the formatted item
      Since:
      0.0.12