logoalt Hacker News

NathanaelReatoday at 6:43 AM0 repliesview on HN

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)