Module: lib/parser

Methods

(static) escapeMarkdownText(text) → {string}

Escape a string for inclusion in Markdown text

Parameters:
Name Type Description
text string
Source:
Returns:
Type
string

(static) getMarkdownParagraphText(paragraph) → {string}

Get a Markdown paragraph model's text

Parameters:
Name Type Description
paragraph Object

The Markdown paragraph model

Source:
Returns:
Type
string

(static) getMarkdownTitle(markdown) → {string|null}

Get a Markdown model's title. Returns null if no title is found.

Parameters:
Name Type Description
markdown Object

The Markdown model

Source:
Returns:
Type
string | null

(static) parseMarkdown(markdown, startLineNumberopt) → {Object}

Parse markdown text or text lines into a Markdown model

Parameters:
Name Type Attributes Default Description
markdown string | Array.<string>

Markdown text or text lines. Null text lines are ignored.

startLineNumber number <optional>
1

The starting line number of the markdown text

Source:
Returns:
Type
Object