java.lang.Object
one.jpro.platform.mdfx.MDFXUtil.Chapter
- Enclosing class:
MDFXUtil
Represents a top-level Chapter with an index, a heading, and optional subchapters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubchapter(String headingText) Call this when encountering a level-2 heading.voidAppend non-heading text to the current subchapter (if present) or to the chapter content otherwise.Returns the content of this chapter (excluding the # heading line, but *including* subchapters).Returns the full Markdown for this chapter, including the # heading line plus all content.Returns the plain text for the chapter’s heading (no # prefix).intgetIndex()Returns the integer index for this chapter.
-
Constructor Details
-
Chapter
-
-
Method Details
-
addSubchapter
Call this when encountering a level-2 heading. -
appendContentToCurrentSubchapterOrChapter
Append non-heading text to the current subchapter (if present) or to the chapter content otherwise. -
getIndex
public int getIndex()Returns the integer index for this chapter. -
getFullMD
Returns the full Markdown for this chapter, including the # heading line plus all content. -
getContent
Returns the content of this chapter (excluding the # heading line, but *including* subchapters). If you want to exclude the subchapters in the content, you can do so by adjusting the logic. -
getHeadingText
Returns the plain text for the chapter’s heading (no # prefix). -
getSubchapters
-