src/MarkdownIt/RulesInline/StateInline.php
public function push($type, $tag, $nesting)
    {
        if ($this->pending) {
            $this->pushPending();
        }

        $token = $this->createToken($type, $tag, $nesting);

        if ($nesting < 0) { $this->level--; }
        $token->level = $this->level;
        if ($nesting > 0) { $this->level++; }

        $this->pendingLevel = $this->level;
        $this->tokens[] = $token;
        return $token;
    }
public function push($type, $tag, $nesting)
    {
        if ($this->pending) {
            $this->pushPending();
        }

        $token = $this->createToken($type, $tag, $nesting);

        if ($nesting < 0) { $this->level--; }
        $token->level = $this->level;
        if ($nesting > 0) { $this->level++; }

        $this->pendingLevel = $this->level;
        $this->tokens[] = $token;
        return $token;
    }
public function push ( $ type , $ tag , $ nesting ) { if ( $ this -> pending ) { $ this -> pushPending ( ) ; } $ token = $ this -> createToken ( $ type , $ tag , $ nesting ) ; if ( $ nesting < 0 ) { $ this -> level -- ; } $ token -> level = $ this -> level ; if ( $ nesting > 0 ) { $ this -> level ++ ; } $ this -> pendingLevel = $ this -> level ; $ this -> tokens [ ] = $ token ; return $ token ; }
Push new token to "stream".
If pending text exists - flush it as text token
@param string  $type
@param string  $tag
@param integer $nesting
@return Token
Push new token to stream . If pending text exists - flush it as text token