Class Header
java.lang.Object
org.tealeaf.javamarkdown.MarkdownElement
org.tealeaf.javamarkdown.types.Structure
org.tealeaf.javamarkdown.elements.Header
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 Summary
-
Method Summary
Methods inherited from class org.tealeaf.javamarkdown.types.Structure
checkType, requiresNewlineAfter, requiresNewlineBefore
Methods inherited from class org.tealeaf.javamarkdown.MarkdownElement
asString, toAppendable, toString, toWriter
-
Constructor Details
-
Header
Creates a new level-1 header- Parameters:
content
- Content to display in the header- Since:
- 0.0.12
-
Header
Creates a new header of a specified level.
- Parameters:
level
- The header level to display. Can only be a number between 1-6content
- 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
Formats the element to a string- Specified by:
asString
in classMarkdownElement
- Returns:
- String representation of the formatted item
- Since:
- 0.0.12
-