java.lang.Object
one.jpro.platform.mdfx.MDFXUtil
Utility class for splitting Markdown text into Chapters and Subchapters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a top-level Chapter with an index, a heading, and optional subchapters.static classRepresents a subchapter with an index, a heading, and content. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<MDFXUtil.Chapter> getChapters(String markdown) Parses the given Markdown string and splits it into a list of Chapter objects.
-
Constructor Details
-
MDFXUtil
public MDFXUtil()
-
-
Method Details
-
getChapters
Parses the given Markdown string and splits it into a list of Chapter objects. Level 1 headings (#) are treated as Chapters. Level 2 headings (##) are treated as Subchapters.- Parameters:
markdown- the input Markdown string- Returns:
- a list of Chapter objects, each containing zero or more Subchapters
-