w3m icon indicating copy to clipboard operation
w3m copied to clipboard

fixes for PRE tag wrapping

Open archenemies opened this issue 4 years ago • 0 comments

I hacked together a couple of patches to make w3m more usable for me.

https://github.com/navarum/tweaks/tree/master/w3m/patches

There is one which changes the behavior of PRE so that it is wrapped on words (but newlines are still respected). This makes Bugzilla and some other websites usable.

I'm not sure why anyone would want to have to scroll horizontally to read something.

I'm not sure why the patch works, I ended up just trying a bunch of things based on clues from the handling of other tags. Let me know if I should do it better so that it would be more useful to others.


FWIW, I have a similar configuration in Firefox (.mozilla/firefox/XXXXX.Default\ User/chrome/userContent.css):

/* https://support.mozilla.org/en-US/questions/1048311 */
pre,code {
  white-space:pre-wrap !important;
  word-wrap:break-word !important;
}

archenemies avatar Apr 24 '20 11:04 archenemies