MarkdownParser

class MarkdownParser(flavour: MarkdownFlavourDescriptor, assertionsEnabled: Boolean = true, cancellationToken: CancellationToken = CancellationToken.NonCancellable)

Constructors

Link copied to clipboard
constructor(flavour: MarkdownFlavourDescriptor)
constructor(flavour: MarkdownFlavourDescriptor, assertionsEnabled: Boolean)
constructor(flavour: MarkdownFlavourDescriptor, assertionsEnabled: Boolean = true, cancellationToken: CancellationToken = CancellationToken.NonCancellable)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun parse(root: IElementType, text: CharSequence, parseInlines: Boolean = true): ASTNode
fun parse(root: IElementType, text: String, parseInlines: Boolean = true): ASTNode
fun parse(root: IElementType, text: CharSequence, parseInlines: Boolean, baseOffset: Int): ASTNode
fun parse(root: IElementType, text: String, parseInlines: Boolean, baseOffset: Int): ASTNode
Link copied to clipboard
fun parseBlock(text: CharSequence, startOffset: Int): ASTNode

Parses one top-level block of text from startOffset with parseInlines = false. The parse stops at the next line start where no block is open. startOffset must be such a line start too. An assertion is raised if startOffset is not a line start. The children of the result are the same as the children of a full parse in that range. The ASTNode.endOffset can be used as startOffset of the next call.

Link copied to clipboard
fun parseInline(root: IElementType, text: CharSequence, textStart: Int, textEnd: Int): ASTNode
fun parseInline(root: IElementType, text: CharSequence, textStart: Int, textEnd: Int, baseOffset: Int): ASTNode