UNPKG

975 BSource Map (JSON)View Raw
1{"version":3,"file":"compact.js","sourceRoot":"","sources":["../../../../src/lib/output/helpers/compact.ts"],"names":[],"mappings":";;AAMA,SAAgB,OAAO,CAAC,OAAY;IAChC,MAAM,KAAK,GAAG,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1C,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;KACrD;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC;AARD,0BAQC","sourcesContent":["/**\n * Compress the given string by removing all newlines.\n *\n * @param text The string that should be compressed.\n * @returns The string with all newlines stripped.\n */\nexport function compact(options: any): string {\n const lines = options.fn(this).split('\\n');\n\n for (let i = 0, c = lines.length; i < c; i++) {\n lines[i] = lines[i].trim().replace(/&nbsp;/, ' ');\n }\n\n return lines.join('');\n}\n"]}
\No newline at end of file