src/DocumentParser.php
public function convert($markdown)
    {
        $root = new Container();

        $this->inlineParser = new InlineParser($this->links, $this->titles);
        $parser = $this->buildParserStack();

        $text = new Text($markdown);
        $this->prepare($text);

        $parser->parseBlock($text, $root);

        $this->inlineParser->parse();

        return $root;
    }
public function convert($markdown)
    {
        $root = new Container();

        $this->inlineParser = new InlineParser($this->links, $this->titles);
        $parser = $this->buildParserStack();

        $text = new Text($markdown);
        $this->prepare($text);

        $parser->parseBlock($text, $root);

        $this->inlineParser->parse();

        return $root;
    }
public function convert ( $ markdown ) { $ root = new Container ( ) ; $ this -> inlineParser = new InlineParser ( $ this -> links , $ this -> titles ) ; $ parser = $ this -> buildParserStack ( ) ; $ text = new Text ( $ markdown ) ; $ this -> prepare ( $ text ) ; $ parser -> parseBlock ( $ text , $ root ) ; $ this -> inlineParser -> parse ( ) ; return $ root ; }
Parse the given Markdown text into a document tree.

@param string $markdown
@return Container
Parse the given Markdown text into a document tree .