// 11ty => Filter out Newline characters in a template: eleventyConfig.addFilter('nl2br', function(str) { return str.replace(/ | | /g, '<br />') }); // USAGE IN A TEMPLATE: {{ some_data | nl2br }}