UNPKG

dgeni-markdown

Version:

dgeni markdown template for generating documentation from source code

17 lines 338 B
/** * @dgRenderFilter nobr * @description remove br. */ module.exports = function() { return { name: 'nobr', process: function(str) { if (!str) { str = ''; } return str.replace(/[\n\r]{2,}/g, '\n') .replace(/[\n\r]{1,2}\s+/g, ' ') .replace(/[\n\r]+/g, ' '); } }; };