Undenty Filter Newlines

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

// USAGE IN A TEMPLATE: {{ some_data | nl2br }}
KostasX