danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 481 forks source link

Code blocks (example & schema) don't support text wrapping #152

Closed seglo closed 9 years ago

seglo commented 9 years ago

When a line is longer than the width of the code div it does not overflow/wrap on to the next line. The only way to see the actual text is to copy & paste it out of the HTML document.

aglio-nowrap

Is there any way to make this text wrap via configuration or some other means?

danielgtaylor commented 9 years ago

@seglo thanks for the bug report. If you update to the latest version I've modified the style to add scrollbars automatically. If you would prefer wrapping, you can do something like this:

my-style.less

pre {
  white-space: pre-wrap;
{

Then run like so:

aglio -i input.apib -o output.html --theme-style default --theme-style ./my-style.less

Hope this helps!

seglo commented 9 years ago

Thanks a lot @danielgtaylor . Works like a charm. Impressive response time! :+1:

HenkPoley commented 5 years ago

For future reference, it's of course:

pre {
  white-space: pre-wrap;
}

{ -> }