I was trying to print out Effective Go and I noticed code blocks get split across pages.
This is easily fixed by amending the CSS a bit:
@media print {
pre {
background: #fff;
border: 0.0625rem solid #bbb;
white-space: pre-wrap;
page-break-inside: avoid; // added this
}
}
Before:

After:

I was trying to print out Effective Go and I noticed code blocks get split across pages.
This is easily fixed by amending the CSS a bit:
Before:

After:
