wizzwizz4 on Nostr: nprofile1q…rg2yn RE ...
nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqw786zzkvu7k2zf2x45kr5h6dreysuz8nrxtumxpeyj3nhdlulgzqprg2yn (nprofile…g2yn) RE https://nantucketebooks.com/blog/2024/12/2024-12-28_prevent_your_em-dashes_from_wrapping.html: I didn't know browsers did that! It might be more elegant to insert U+2060 WORD JOINER instead:
.replace(/(\s)(\S+)(—|—)/gi, "$1$2⁠$3")
An alternative, suitable for some texts, would be setting `hyphens: manual;`, and then (manually?) inserting ­ at every suitable point; but I prefer to let the (potentially-customised) user agent handle layout decisions as much as possible.
(Btw, remember to escape < and & in <code> tags!)
.replace(/(\s)(\S+)(—|—)/gi, "$1$2⁠$3")
An alternative, suitable for some texts, would be setting `hyphens: manual;`, and then (manually?) inserting ­ at every suitable point; but I prefer to let the (potentially-customised) user agent handle layout decisions as much as possible.
(Btw, remember to escape < and & in <code> tags!)