/** * */ public function testHello() { $lexer = new Markdown\Lexer(); $source = file_get_contents($this->dataPath("section-01.md")); $lexer->setSource($source); echo PHP_EOL; while ($t = $lexer->nextToken()) { // echo json_encode($t->core(), JSON_UNESCAPED_SLASHES) . PHP_EOL; } }
/** * @param string $source * @return static */ public function rewind() { parent::rewind(); $this->errors = []; $this->metadata = []; $this->usedLinks = []; $this->referenceLinks = []; $this->htmlBlockDepth = 0; $this->getBuilder()->setDocument(null); return $this; }