Preventing line breaks in <code> elements
alexwlchan.net
alexwlchan.net
The more fundamental question for me is why the author didn't decide to make make code blocks non-breaking by default, or just add the class annotations when he writes the HTML?
Actually, depending on what you're doing, it can be totally fine. Just be aware that you're losing some generality.
> You can absolutely parse HTML with regex, so long as the document is finite in length
This isn't sufficient, unless I'm misinterpreting what you're saying. It's not enough to have documents of finite length (all documents are finite in length), you need documents with a max length, so you have a finite number of possible documents to parse.
And also
> Nov, 2020
And then, StackOverflow asks itself why it looses users.