3 ms·
How should a browser differentiate between a <pre> of hard-wrapped prose (that it could reflow in reader mode) and a <pre> of code?
by Kwpolska 3y ago
How should a browser differentiate between a <pre> of hard-wrapped prose (that it could reflow in reader mode) and a <pre> of code?
- TheDong 3y agoIn an email you can't of course since an email could contain one, the other, or a mix. And, in fact, most mailing list emails I read these days do contain code and code reviews. However, if the user clicked the "reader mode" button, that's a good sign the user thinks this is reflowable text. Firefox's reader mode figures this out. Safari's doesn't.
- Kwpolska 3y agoOr you might use Reader Mode on a programming blog, which has both prose and code, and you wouldn’t want to change the code in that case.