Twig Clean Debug
Component ID
2772491
Component name
Twig Clean Debug
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
202
Component created
Component changed
Component body
Provides a filter for use in twig templates to clean away twig debugging output (mostly html comments describing template suggestions etc).
When in twig debug mode the html comments can interfere with development. This filter cleans away the suggestions using regex.
Usage
Must be used in conjunction with the |raw filter otherwise output will be double escaped, e.g.:
{{ content.field_image|clean_debug|raw }}
Warning: this will throw an exeption if the site is not in twig debug mode.
