Moodle  2.2.1
http://www.collinsharper.com
Markdown_Parser Class Reference
Inheritance diagram for Markdown_Parser:

Public Member Functions

 Markdown_Parser ()
 setup ()
 teardown ()
 transform ($text)
 stripLinkDefinitions ($text)
 _stripLinkDefinitions_callback ($matches)
 hashHTMLBlocks ($text)
 _hashHTMLBlocks_callback ($matches)
 hashPart ($text, $boundary= 'X')
 hashBlock ($text)
 runBlockGamut ($text)
 runBasicBlockGamut ($text)
 doHorizontalRules ($text)
 runSpanGamut ($text)
 doHardBreaks ($text)
 _doHardBreaks_callback ($matches)
 doAnchors ($text)
 _doAnchors_reference_callback ($matches)
 _doAnchors_inline_callback ($matches)
 doImages ($text)
 _doImages_reference_callback ($matches)
 _doImages_inline_callback ($matches)
 doHeaders ($text)
 _doHeaders_callback_setext ($matches)
 _doHeaders_callback_atx ($matches)
 doLists ($text)
 _doLists_callback ($matches)
 processListItems ($list_str, $marker_any_re)
 _processListItems_callback ($matches)
 doCodeBlocks ($text)
 _doCodeBlocks_callback ($matches)
 makeCodeSpan ($code)
 prepareItalicsAndBold ()
 doItalicsAndBold ($text)
 doBlockQuotes ($text)
 _doBlockQuotes_callback ($matches)
 _doBlockQuotes_callback2 ($matches)
 formParagraphs ($text)
 encodeAttribute ($text)
 encodeAmpsAndAngles ($text)
 doAutoLinks ($text)
 _doAutoLinks_url_callback ($matches)
 _doAutoLinks_email_callback ($matches)
 encodeEmailAddress ($addr)
 parseSpan ($str)
 handleSpanToken ($token, &$str)
 outdent ($text)
 detab ($text)
 _detab_callback ($matches)
 _initDetab ()
 unhash ($text)
 _unhash_callback ($matches)

Data Fields

 $nested_brackets_depth = 6
 $nested_brackets_re
 $nested_url_parenthesis_depth = 4
 $nested_url_parenthesis_re
 $escape_chars = '\`*_{}[]()>#+-.!'
 $escape_chars_re
 $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX
 $tab_width = MARKDOWN_TAB_WIDTH
 $no_markup = false
 $no_entities = false
 $predef_urls = array()
 $predef_titles = array()
 $urls = array()
 $titles = array()
 $html_hashes = array()
 $in_anchor = false
 $document_gamut
 $block_gamut
 $span_gamut
 $list_level = 0
 $em_relist
 $strong_relist
 $em_strong_relist
 $em_strong_prepared_relist
 $utf8_strlen = 'mb_strlen'

Detailed Description

Definition at line 215 of file markdown.php.


Member Function Documentation

_detab_callback ( matches)

Definition at line 1628 of file markdown.php.

Definition at line 776 of file markdown.php.

Here is the call graph for this function:

Definition at line 742 of file markdown.php.

Here is the call graph for this function:

Definition at line 1475 of file markdown.php.

Here is the call graph for this function:

_doAutoLinks_url_callback ( matches)

Definition at line 1470 of file markdown.php.

Here is the call graph for this function:

_doBlockQuotes_callback ( matches)

Definition at line 1320 of file markdown.php.

Here is the call graph for this function:

_doBlockQuotes_callback2 ( matches)

Definition at line 1334 of file markdown.php.

_doCodeBlocks_callback ( matches)

Definition at line 1120 of file markdown.php.

Here is the call graph for this function:

_doHardBreaks_callback ( matches)

Definition at line 667 of file markdown.php.

Here is the call graph for this function:

_doHeaders_callback_atx ( matches)

Reimplemented in MarkdownExtra_Parser.

Definition at line 938 of file markdown.php.

Here is the call graph for this function:

Reimplemented in MarkdownExtra_Parser.

Definition at line 929 of file markdown.php.

Here is the call graph for this function:

_doImages_inline_callback ( matches)

Definition at line 880 of file markdown.php.

Here is the call graph for this function:

Definition at line 852 of file markdown.php.

Here is the call graph for this function:

_doLists_callback ( matches)

Definition at line 1011 of file markdown.php.

Here is the call graph for this function:

_hashHTMLBlocks_callback ( matches)

Definition at line 526 of file markdown.php.

Here is the call graph for this function:

Definition at line 1645 of file markdown.php.

Here is the caller graph for this function:

Definition at line 1077 of file markdown.php.

Here is the call graph for this function:

Definition at line 380 of file markdown.php.

_unhash_callback ( matches)

Definition at line 1666 of file markdown.php.

detab ( text)

Definition at line 1615 of file markdown.php.

Here is the caller graph for this function:

doAnchors ( text)

Definition at line 672 of file markdown.php.

doAutoLinks ( text)

Definition at line 1443 of file markdown.php.

doBlockQuotes ( text)

Definition at line 1305 of file markdown.php.

doCodeBlocks ( text)

Definition at line 1102 of file markdown.php.

doHardBreaks ( text)

Definition at line 662 of file markdown.php.

doHeaders ( text)

Reimplemented in MarkdownExtra_Parser.

Definition at line 899 of file markdown.php.

doHorizontalRules ( text)

Definition at line 608 of file markdown.php.

Here is the call graph for this function:

doImages ( text)

Definition at line 797 of file markdown.php.

doItalicsAndBold ( text)

Definition at line 1182 of file markdown.php.

Here is the call graph for this function:

doLists ( text)

Definition at line 945 of file markdown.php.

Here is the caller graph for this function:

encodeAmpsAndAngles ( text)

Definition at line 1422 of file markdown.php.

Here is the caller graph for this function:

encodeAttribute ( text)

Definition at line 1411 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

encodeEmailAddress ( addr)

Definition at line 1482 of file markdown.php.

Here is the caller graph for this function:

formParagraphs ( text)

Reimplemented in MarkdownExtra_Parser.

Definition at line 1341 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

handleSpanToken ( token,
&$  str 
)

Definition at line 1579 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

hashBlock ( text)

Definition at line 556 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

hashHTMLBlocks ( text)

Reimplemented in MarkdownExtra_Parser.

Definition at line 389 of file markdown.php.

Here is the caller graph for this function:

hashPart ( text,
boundary = 'X' 
)

Definition at line 533 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

makeCodeSpan ( code)

Definition at line 1134 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 242 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

outdent ( text)

Definition at line 1603 of file markdown.php.

Here is the caller graph for this function:

parseSpan ( str)

Definition at line 1523 of file markdown.php.

Here is the call graph for this function:

Definition at line 1160 of file markdown.php.

Here is the caller graph for this function:

processListItems ( list_str,
marker_any_re 
)

Definition at line 1031 of file markdown.php.

Here is the caller graph for this function:

runBasicBlockGamut ( text)

Definition at line 591 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

runBlockGamut ( text)

Definition at line 577 of file markdown.php.

Here is the call graph for this function:

Here is the caller graph for this function:

runSpanGamut ( text)

Definition at line 650 of file markdown.php.

Here is the caller graph for this function:

setup ( )

Reimplemented in MarkdownExtra_Parser.

Definition at line 275 of file markdown.php.

Here is the caller graph for this function:

stripLinkDefinitions ( text)

Definition at line 346 of file markdown.php.

teardown ( )

Reimplemented in MarkdownExtra_Parser.

Definition at line 288 of file markdown.php.

Here is the caller graph for this function:

transform ( text)

Definition at line 299 of file markdown.php.

Here is the call graph for this function:

unhash ( text)

Definition at line 1659 of file markdown.php.

Here is the caller graph for this function:


Field Documentation

$block_gamut
Initial value:
 array(
        #
        # These are all the transformations that form block-level
        # tags like paragraphs, headers, and list items.
        #
                "doHeaders"         => 10,
                "doHorizontalRules" => 20,
                
                "doLists"           => 40,
                "doCodeBlocks"      => 50,
                "doBlockQuotes"     => 60,
                )

Definition at line 564 of file markdown.php.

$document_gamut
Initial value:
 array(
                # Strip link definitions, store in hashes.
                "stripLinkDefinitions" => 20,
                
                "runBasicBlockGamut"   => 30,
                )

Definition at line 338 of file markdown.php.

$em_relist
Initial value:
 array(
                ''  => '(?:(?<!\*)\*(?!\*)|(?<!_)_(?!_))(?=\S|$)(?![.,:;]\s)',
                '*' => '(?<=\S|^)(?<!\*)\*(?!\*)',
                '_' => '(?<=\S|^)(?<!_)_(?!_)',
                )

Reimplemented in MarkdownExtra_Parser.

Definition at line 1143 of file markdown.php.

$em_strong_prepared_relist

Definition at line 1158 of file markdown.php.

$em_strong_relist
Initial value:
 array(
                ''    => '(?:(?<!\*)\*\*\*(?!\*)|(?<!_)___(?!_))(?=\S|$)(?![.,:;]\s)',
                '***' => '(?<=\S|^)(?<!\*)\*\*\*(?!\*)',
                '___' => '(?<=\S|^)(?<!_)___(?!_)',
                )

Reimplemented in MarkdownExtra_Parser.

Definition at line 1153 of file markdown.php.

$empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX

Definition at line 230 of file markdown.php.

$escape_chars = '\`*_{}[]()>#+-.!'

Definition at line 226 of file markdown.php.

$escape_chars_re

Definition at line 227 of file markdown.php.

$html_hashes = array()

Definition at line 269 of file markdown.php.

$in_anchor = false

Definition at line 272 of file markdown.php.

$list_level = 0

Definition at line 1029 of file markdown.php.

$nested_brackets_depth = 6

Definition at line 219 of file markdown.php.

$nested_brackets_re

Definition at line 220 of file markdown.php.

$nested_url_parenthesis_depth = 4

Definition at line 222 of file markdown.php.

$nested_url_parenthesis_re

Definition at line 223 of file markdown.php.

$no_entities = false

Definition at line 235 of file markdown.php.

$no_markup = false

Definition at line 234 of file markdown.php.

$predef_titles = array()

Definition at line 239 of file markdown.php.

$predef_urls = array()

Definition at line 238 of file markdown.php.

$span_gamut
Initial value:
 array(
        #
        # These are all the transformations that occur *within* block-level
        # tags like paragraphs, headers, and list items.
        #
                # Process character escapes, code spans, and inline HTML
                # in one shot.
                "parseSpan"           => -30,

                # Process anchor and image tags. Images must come first,
                # because ![foo][f] looks like an anchor.
                "doImages"            =>  10,
                "doAnchors"           =>  20,
                
                # Make links out of things like `<http:
                # Must come after doAnchors, because you can use < and >
                # delimiters in inline links like [this](<url>).
                "doAutoLinks"         =>  30,
                "encodeAmpsAndAngles" =>  40,

                "doItalicsAndBold"    =>  50,
                "doHardBreaks"        =>  60,
                )

Definition at line 626 of file markdown.php.

$strong_relist
Initial value:
 array(
                ''   => '(?:(?<!\*)\*\*(?!\*)|(?<!_)__(?!_))(?=\S|$)(?![.,:;]\s)',
                '**' => '(?<=\S|^)(?<!\*)\*\*(?!\*)',
                '__' => '(?<=\S|^)(?<!_)__(?!_)',
                )

Reimplemented in MarkdownExtra_Parser.

Definition at line 1148 of file markdown.php.

$tab_width = MARKDOWN_TAB_WIDTH

Definition at line 231 of file markdown.php.

$titles = array()

Definition at line 268 of file markdown.php.

$urls = array()

Definition at line 267 of file markdown.php.

$utf8_strlen = 'mb_strlen'

Definition at line 1613 of file markdown.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations