public function saveState() { return new CursorState($this->line, $this->length, $this->currentPosition, $this->previousPosition, $this->firstNonSpaceCache, $this->indent, $this->column, $this->partiallyConsumedTab); }
/** * @param \League\CommonMark\ContextInterface $context * @param \League\CommonMark\InlineParserContext $inlineContext * @return bool */ public function parse(ContextInterface $context, InlineParserContext $inlineContext) { $this->context = $context; $this->inlineContext = $inlineContext; $this->cursor = $inlineContext->getCursor(); $this->originalState = $this->cursor->saveState(); $this->cursor->advance(); return $this->parseMediaType(); }