(text: &str, max_width: usize)
| 268 | } |
| 269 | |
| 270 | fn wrap_display_lines(text: &str, max_width: usize) -> Vec<String> { |
| 271 | let mut out = Vec::new(); |
| 272 | for raw in text.lines() { |
| 273 | let sanitized = raw.replace('\t', " "); |
| 274 | out.extend(wrap_to_display_width(&sanitized, max_width)); |
| 275 | } |
| 276 | if out.is_empty() { |
| 277 | out.push(String::new()); |
| 278 | } |
| 279 | out |
| 280 | } |
| 281 | |
| 282 | /// Dispatch to the appropriate inline renderer |
| 283 | fn render_inline_dispatch( |
no test coverage detected