Comment

Comment by NathanaelRea

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)
parent NathanaelRea 10 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton