Toggle line wrap in code blocks
complete
L
Liam
Long lines (especially inline comments) are annoying to read within code blocks. I can override this with a manual hack in
custom.css
:.prism-code > div {
white-space : pre-wrap;
}
But what I'd love to have is a button to toggle line wrap on and off within code blocks globally. This could be right next to the Copy button.
Maybe there's a way to do this... but I'm not sure how. Any tips would be much appreciated!
Joshua Chen
complete
Joshua Chen
in progress
L
Liam
This is analogous to how code editors let you toggle line wrap. E.g. in VSCode on Mac it's called "Toggle Word Wrap", activated with Option + Z