Skip to content

Commit bff4cbd

Browse files
committed
fixed link highlight in method signature
1 parent 94bebce commit bff4cbd

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

templates/html/ApiRenderer.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,13 @@ public function renderMethodSignature($method, $context = null)
258258
{
259259
$params = [];
260260
foreach ($method->params as $param) {
261-
$params[] = (empty($param->typeHint) ? '' : $this->createTypeLink($param->typeHint, $context) . ' ')
262-
. ($param->isPassedByReference ? '<b>&</b>' : '')
263-
. $param->name
264-
. ($param->isOptional ? ' = ' . $param->defaultValue : '');
261+
$params[] = (empty($param->typeHint) ? '' : '<span class="signature-type">' . $this->createTypeLink($param->typeHint, $context) . '</span> ')
262+
. ApiMarkdown::highlight(
263+
($param->isPassedByReference ? '<b>&</b>' : '')
264+
. $param->name
265+
. ($param->isOptional ? ' = ' . $param->defaultValue : ''),
266+
'php'
267+
);
265268
}
266269

267270
$definition = [];
@@ -277,7 +280,7 @@ public function renderMethodSignature($method, $context = null)
277280
. '<span class="signature-type">' . ($method->isReturnByReference ? '<b>&</b>' : '')
278281
. ($method->returnType === null ? 'void' : $this->createTypeLink($method->returnTypes, $context)) . '</span> '
279282
. '<strong>' . $this->createSubjectLink($method, $method->name) . '</strong>'
280-
. ApiMarkdown::highlight(str_replace(' ', ' ', '( ' . implode(', ', $params) . ' )'), 'php');
283+
. str_replace(' ', ' ', '( ' . implode(', ', $params) . ' )');
281284
}
282285

283286
/**

0 commit comments

Comments
 (0)