Table of Contents

Class MarkdownUtility

Namespace
Songhay.Publications
Assembly
Songhay.Publications.dll

Shared routines for Markdown

public static class MarkdownUtility
Inheritance
MarkdownUtility
Inherited Members

Methods

ConvertPreBlockToHtml(XElement)

Converts a pre element into EPUB-friendly HTML.

public static void ConvertPreBlockToHtml(XElement preElement)

Parameters

preElement XElement

The preXElement.

GetFourSpaces()

Returns a conventional number of space characters.

public static string GetFourSpaces()

Returns

string

GetFourSpacesToken()

Returns a conventional token representing four space characters.

public static string GetFourSpacesToken()

Returns

string

Remarks

This is a trick used for automating find-change operations.

GetPElementWithNewLine()

Returns a p element delimited by NewLine.

public static string GetPElementWithNewLine()

Returns

string

GetPreLines(XElement)

Decomposes the Value of the specified pre element.

public static List<string> GetPreLines(XElement preElement)

Parameters

preElement XElement

The preXElement.

Returns

List<string>

Remarks

Note: the first and last elements of preList should be empty(when no leading spaces before

)
or should contain pre open and closing, respectively
(when there are leading spaces before 
).

IsMarkdownParagraph(string)

Returns true when a block of text starts with a p element.

public static bool IsMarkdownParagraph(string input)

Parameters

input string

The string input.

Returns

bool