public function MappingFieldsFilter::process in Gutenberg 8
Process all content.
Overrides FilterInterface::process
File
- src/
Plugin/ Filter/ MappingFieldsFilter.php, line 55
Class
- MappingFieldsFilter
- Class MappingFieldsFilter.
Namespace
Drupal\gutenberg\Plugin\FilterCode
public function process($text, $langcode) {
$text = preg_replace_callback('#((<!-- .*\\{.*"mappingFields".*} -->)([\\s\\S]*?)(<!-- \\/[\\s\\S]*?-->)|(<!-- .*\\{.*"mappingFields".*} \\/-->))#', [
$this,
'renderWithoutMappingFields',
], $text);
return new FilterProcessResult($text);
}