public function GeshiFilterFilter::preparePhpCallback in GeSHi Filter for syntax highlighting 8
Same name and namespace in other branches
- 8.2 src/Plugin/Filter/GeshiFilterFilter.php \Drupal\geshifilter\Plugin\Filter\GeshiFilterFilter::preparePhpCallback()
Callback for _geshifilter_prepare for < ?php ... ? > blocks.
Parameters
array $match: An array with the pieces from matched string.
File
- src/
Plugin/ Filter/ GeshiFilterFilter.php, line 944
Class
- GeshiFilterFilter
- Provides a base filter for Geshi Filter.
Namespace
Drupal\geshifilter\Plugin\FilterCode
public function preparePhpCallback(array $match) {
if ($this
->decodeEntities()) {
$match[2] = $this
->unencode($match[2]);
}
return '[geshifilter-questionmarkphp]' . str_replace([
"\r",
"\n",
], [
'',
' ',
], SafeMarkup::checkPlain($match[2])) . '[/geshifilter-questionmarkphp]';
}