add link to tables in error messages
This commit is contained in:
@@ -276,8 +276,8 @@ class ToolBox
|
||||
|
||||
//Phase 3: Rebuild link
|
||||
$asPatterns = array();
|
||||
$sPreChar = '(^|\ |\*|\')';
|
||||
$sPostChar = '(\ |\.|\:|$)';
|
||||
$sPreChar = '(^|\ |\*|\'|\()';
|
||||
$sPostChar = '(\ |\.|\:|\)|$)';
|
||||
foreach($asReplacements as $sHash=>$sPage)
|
||||
{
|
||||
if(mb_strlen($sHash)>1)
|
||||
@@ -288,7 +288,7 @@ class ToolBox
|
||||
$asPatterns['`'.$sPreChar.$sHash.'\ ([\d]+)'.$sPostChar.'`mui'] = '$1<a href="#'.$sPage.'-$2" target="_blank" class="internal_link round"><i class="fa fa-inline fa-c-'.$sPage.'"></i><span class="type">'.$sTitle.'</span> n°<span class="item">$2</span></a>$3';
|
||||
|
||||
//Type + phrase
|
||||
if($sPage=='table') $asPatterns['`'.$sPreChar.'(?i)'.$sHash.'(?-i)\ ([_A-Z0-9]+)'.$sPostChar.'`mu'] = '$1<a href="#'.$sPage.'-$2" target="_blank" class="internal_link round"><i class="fa fa-inline fa-c-'.$sPage.'"></i><span class="type">'.$sTitle.'</span> <span class="item">$2</span></a>$3';
|
||||
if($sPage=='table') $asPatterns['`'.$sPreChar.'(?i)'.$sHash.'(?-i)\ ([_A-Z0-9\*\/]+)'.$sPostChar.'`mu'] = '$1<a href="#'.$sPage.'-$2" target="_blank" class="internal_link round"><i class="fa fa-inline fa-c-'.$sPage.'"></i><span class="type">'.$sTitle.'</span> <span class="item">$2</span></a>$3';
|
||||
}
|
||||
}
|
||||
$sText = preg_replace(array_keys($asPatterns), array_values($asPatterns), $sText);
|
||||
|
||||
Reference in New Issue
Block a user