\n' + text.split('\n\n').map(s => { const lines = s.split('\n'); const first = lines[0]; const rest = lines.slice(1).join('\n'); if (/^\d+\./.test(first)) return '

    ' + first + '

    ' + rest.replace(/\n/g, '
    ') + '

    '; if (first === first.toUpperCase() && first.length > 5) return '

    ' + first + '

    ' + rest.replace(/\n/g, '
    ') + '

    '; return '

    ' + s.replace(/\n/g, '
    ') + '

    '; }).join('\n') + '\n \n'; const blob = new Blob([html], {type: 'text/html'}); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'privacy-policy.html'; a.click(); } $('#input').addEventListener('input', generate); $('#toolbar').innerHTML=``; GZ.renderToolPage({category:'text',titleKey:'toolTitle',descKey:'toolDesc',howToSteps:['step1','step2','step3','step4'],related:[{icon:'📝',href:'/text/terms-of-service-generator.html',name:'Terms of Service Generator'}]}); generate();