haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
362 stars 242 forks source link

Fix line wrapping in instances list #1525

Closed lf- closed 1 year ago

lf- commented 2 years ago

Previously, we set the white-space to nowrap on the instances section. This is incorrect, because it means that on particularly long instances, the text will overflow the page and cause horizontal scrolling.

I chose pre-wrap here because this is code. This setting will, per MDN, ensure that:

Sequences of white space are preserved. Lines are broken at newline
characters, at <br>, and as necessary to fill line boxes.

before: image

after: image

lf- commented 2 years ago

CI failure appears spurious/unrelated to these changes

lf- commented 1 year ago

rebased in case that's the CI fix oop there were no changes

lf- commented 1 year ago

@Kleidukos in case you didn't get notified :)

No worries if you're busy and can't review; we patched it internally but would like to contribute the fix back.

Kleidukos commented 1 year ago

If the fix is already used somewhere that's fantastic. I'll take care of your PR. Thanks a lot for your patience.

Kleidukos commented 1 year ago

Thank you :green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart: