comprehensive-rust icon indicating copy to clipboard operation
comprehensive-rust copied to clipboard

Remove horizontal scrolling in the rust code blocks

Open 1dimir opened this issue 1 year ago • 3 comments

  • ~~Reduce max_width for rustfmt: 85 -> 81 - to fit into blocks with line numbers;~~
  • Apply rustfmt for code chunks with long lines;
  • Reorganize long use statement;
  • Manually wrap long strings in macros;

#2012

1dimir avatar Apr 21 '24 19:04 1dimir

That's funny. 81 produces a lot of false positives and 85 wants to reconstruct back the wrapped expressions. And I'm not certain, if to use #[rustfmt::skip] for those is the right idea.

1dimir avatar Apr 21 '24 20:04 1dimir

As mentioned in #2012, dprint fmt should be used to format both Rust and Markdown code consistently.

mgeisler avatar Apr 22 '24 07:04 mgeisler

This PR might benefit from the work of @michael-kerscher in #2258. That is, perhaps the slide evaluator could also detect and flag scrollbars in code blocks?

mgeisler avatar Aug 21 '24 06:08 mgeisler