by vogon_laureate on 7/20/23, 7:01 PM with 1 comments
by gwern on 7/20/23, 7:16 PM
Oh, I know this one! We tried <q> for years on my website and gave up (https://gwern.net/design-graveyard#quote-syntax-highlighting) for a variety of reasons, but mostly that it caused endless problems with all other kinds of styling or layout. It became clear that <q> is just too far off the CSS/browser happy path to risk using; no one thinks about it and no one will fix your bugs and you're on your own.
However, the copy-paste issue wasn't too bad. You would use a copy-paste listener: some JS which fires when the user does a copy-paste, and rewrites the the <q>s to literal Unicode/ASCII quotes. Since you will often wind up using a copy-paste listener for other things (in our case, to remove soft hyphens and replace rendered-math equations with the original LaTeX), this is not a dealbreaker.