Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Easy fix :)

  function f(n){n.childNodes.forEach(c=>{c.nodeType===3?c.textContent=c.textContent.replace(/(^|[.!?]\s+)([a-z])/g,(m,s,l)=>s+l.toUpperCase()):c.nodeType===1&&f(c)})}f(document.body)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: