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
GetFourSpaces()
Returns a conventional number of space characters.
public static string GetFourSpaces()
Returns
GetFourSpacesToken()
Returns a conventional token representing four space characters.
public static string GetFourSpacesToken()
Returns
Remarks
This is a trick used for automating find-change operations.
GetPElementWithNewLine()
Returns a p element
delimited by NewLine.
public static string GetPElementWithNewLine()
Returns
GetPreLines(XElement)
Decomposes the Value
of the specified pre element.
public static List<string> GetPreLines(XElement preElement)
Parameters
Returns
Remarks
Note: the first and last elements of preList should be empty(when no leading spaces before
) or should containpre 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)