GH_Parser

public class GH_Parser
Provides parsing methods for the Grasshopper Markdown flavour.

Properties

Whitespace

#
Gets an array of characters that are considered to be whitespace. At the moment, this array contains the space char and the tab char, it does not contain feeds or breaks.
public static char[] Whitespace { get; }

Methods

IsChapterHeaderLine

#
Test whether a line represents a chapter header underline. Chapter header underlines contain at least 4 consecutive equals symbols preceded or followed by any amount of white space.
public static bool IsChapterHeaderLine(
line
Line to test.
)
True if the line is considered to be a chapter header underline.

IsCommentLine

#
Test whether a line is a comment. Commented lines begin with double slashes (//) and are ignored during parsing.
public static bool IsCommentLine(
line
Line to test. If you supply a multi-line string, death's too good for you.
)
True if the line is a comment line.

IsLinkLine

#
Test whether a line represents a referenced link target.
public static bool IsLinkLine(
line,
Line to test.
ref string
linkId,
ref string
linkTarget,
ref string
linkTooltip
)
True if the line is a referenced link.

IsLinkLine

#
Test whether a line represents a referenced link target. Note; this is a quick check. The link might still be invalid, use the IsLinkLine overload to include validity checks.
public static bool IsLinkLine(
line
Line to test.
)
True if the line is a referenced link.

IsListLine

#
Test whether a line contains a list item.
public static bool IsListLine(
line
Line to check.
)
True if the line contains a list item.

IsParagraphHeaderLine

#
Test whether a line represents a paragraph header underline. Paragraph header underlines contain at least 4 consecutive dashes preceded or followed by any amount of white space.
public static bool IsParagraphHeaderLine(
line
Line to test.
)
True if the line is considered to be a paragraph header underline.

IsQuoteLine

#
Test whether a line is a block quote line. Block quotes start with a larger than symbol.
public static bool IsQuoteLine(
line
Line to test.
)
True if the line is a block quote.

StringToFragment

#
Parse a block of text and return it as an interpreted IGH_Fragment.
public static IGH_Content StringToFragment(
text
Text to parse.
)
Fragment representing the text.