alex-shpak / hugo-book

Hugo documentation theme as simple as plain book
https://hugo-book-demo.netlify.app
MIT License
3.4k stars 1.17k forks source link

How to wrap long lines inside of markdown ``` code ``` in hugo-book? #558

Closed BrentHuang closed 7 months ago

BrentHuang commented 1 year ago

eg.

some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; some very long line; 

Horizontal scroll bars are not required, but text is expected to wrap automatically (e.g., a line of up to 80 characters), which is very important for paper printing.

alex-shpak commented 10 months ago

Hi! By default code block do not wrap text as it uses <pre> tag, you can adjust that with css

.markdown  pre {
  whitespace: auto
}

in assets/_custom.scss