Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
x/website: better HTML printing, don't page break inside code blocks #33933
Why is breaking a page across a code block not desirable? For one thing, it's more environmentally friendly to fill every page. Also, I remember back in the day that it wasn't unheard of of copying multiple pages of books filled with qbasic code. A page break never bothered me really.
Maybe we can only do this for small code blocks?
It's not desirable (to me) because it makes reading large blocks of code more difficult. Perhaps I'm just not used to reading printed out code split across pages. :) It's annoying to have to shuffle back and forth to try read a block of code, especially if you have the pages bound and can't see the other page.
Doing this for small blocks of code seems much more difficult, and perhaps not worth the effort then. You'd have to tag each small block of code throughout the entire website with a different class that you can target.
Personally this change is much more about large blocks of code than smaller blocks anyway. For me, that's the 80/20.
Would you be happy buying a technical book with code split across pages? I suspect most people wouldn't be.
For larger blocks? Sure.
Anyways, feel free to fly with it. Just wanted to bring up some points that possibly hadn't been considered yet. I'm not that strongly opinionated on it.