Exemple #1
0
 /**
  *
  */
 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;
     }
 }
Exemple #2
0
 /**
  * @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;
 }