\DocumentationParser
Parser wrapping the Markdown Extra parser.
Synopsis
class DocumentationParser
{
- // constants
- const CODE_BLOCK_BACKTICK = 1;
- const CODE_BLOCK_COLON = 2;
- // members
- public static array $heading_counts = ;
- // methods
- public static string parse()
- public static void rewrite_code_blocks()
- private static array finalize_code_output()
- public static void rewrite_image_links()
- public static String rewrite_api_links()
- public static void rewrite_heading_anchors()
- public static void _rewrite_heading_anchors_callback()
- public static String generate_html_id()
- public static String rewrite_relative_links()
Constants
Name | Value |
---|---|
CODE_BLOCK_BACKTICK | 1 |
CODE_BLOCK_COLON | 2 |
Members
public
- $heading_counts — array
Methods
private
- finalize_code_output() — Adds the closing code backticks. Removes trailing whitespace.
public
- _rewrite_heading_anchors_callback()
- generate_html_id() — Generate an html element id from a string
- parse() — Parse a given path to the documentation for a file. Performs a case insensitive lookup on the file system. Automatically appends the file extension to one of the markdown extensions as well so /install/ in a web browser will match /install.md or /INSTALL.md.
- rewrite_api_links() — Rewrite links with special "api:" prefix to html as in the following example:
- rewrite_code_blocks()
- rewrite_heading_anchors()
- rewrite_image_links()
- rewrite_relative_links() — Resolves all relative links within markdown.