You are here

public static function CodeFilter::codeTagCallback in Code Filter 8

Callback to escape content of <code> tags.

Parameters

array $matches: An array of matches passed by preg_replace_callback().

Return value

string A formatted string.

File

src/Plugin/Filter/CodeFilter.php, line 81

Class

CodeFilter
Text filter for highlighting PHP source code.

Namespace

Drupal\codefilter\Plugin\Filter

Code

public static function codeTagCallback(array $matches) {
  return self::escape($matches[1], 'code');
}