コード例 #1
0
ファイル: Body.php プロジェクト: hollodotme/treemdown
 private function modifyInternalLinks()
 {
     if (!is_null($this->_parsed_markdown)) {
         $linker = new Linker($this->_tree->getSearch());
         foreach ($linker->getInternalLinks($this->_parsed_markdown) as $internal_link) {
             $linker->modifyInternalLink($internal_link);
         }
     }
 }
コード例 #2
0
ファイル: LinkerTest.php プロジェクト: hollodotme/treemdown
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testGetInternalLinksFailsOnNodeWithoutOwnerDocument()
 {
     $linker = new Linker(new Search($this->test_options));
     $node = new \DOMElement('test', 'unit');
     $linker->getInternalLinks($node);
 }