From 7e1fc567fa7b94860b36e848e891098f0b8ed205 Mon Sep 17 00:00:00 2001 From: David Alexander Date: Fri, 5 Feb 2016 17:17:26 -0700 Subject: [PATCH] revert to original algorithm --- code/DocumentationParser.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/DocumentationParser.php b/code/DocumentationParser.php index c4f2d04..35a9aa5 100755 --- a/code/DocumentationParser.php +++ b/code/DocumentationParser.php @@ -296,11 +296,11 @@ class DocumentationParser * * The above api links can be enclosed in backticks. * - * The markdown parser gets confused by the extra pair of parentheses in links of the form [DataObject](api:DataObject->populateDefaults()) so + * The markdown parser gets confused by the extra pair of parentheses in links of the form [DataObject](api:DataObject::populateDefaults()) so * all links are re-written as html markup instead of markdown [Title](url). This also prevents other markdown parsing problems. * - * @param String $md - * @param DocumentationPage $page + * @param String $markdown + * @param DocumentationPage $doc_page * @return String */ public static function rewrite_api_links($markdown, $doc_page) @@ -328,7 +328,7 @@ class DocumentationParser $title = $links[1][$i]; $link = $links[1][$i]; // change backticked links to avoid being parsed in the same way as non-backticked links - $markdown = str_replace('`'.$match.'`','SS'.$link.'SS',$markdown); + $markdown = str_replace('`'.$match.'`','XYZ'.$link.'XYZ',$markdown); } else { $title = $links[1][$i]; $link = $links[2][$i]; @@ -342,7 +342,7 @@ class DocumentationParser } // recover backticked links with no titles - preg_match_all('#SS(.*)?SS#', $markdown, $links); + preg_match_all('#XYZ(.*)?XYZ#', $markdown, $links); if($links) { foreach($links[0] as $i => $match) { $link = $links[1][$i];