UNPKG

drupal-twig-extensions

Version:

JavaScript implementation of Drupal’s Twig extensions

15 lines (12 loc) 381 B
import { newTwigExtension } from '../../helpers/twig.js'; import { callable as escape } from '../drupal_escape/twig.js'; import { name, options, acceptedArguments, wrapPlaceholder, } from './definition.js'; export function callable(value) { return wrapPlaceholder(escape(value, ['html'])); } export default newTwigExtension(name, callable, options, acceptedArguments);