Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2c36f34

Browse files
committed
fix(render): No implicit padding with starting secondary groups
Workaround for rust-lang#309
1 parent 867261d commit 2c36f34

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎src/renderer/render.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ pub(crate) fn render(renderer: &Renderer, groups: Report<'_>) -> String {
8989
max_line_num_len + 1,
9090
);
9191
}
92-
if peek.is_none() && g == 0 && group_len > 1 {
92+
if peek.is_none()
93+
&& title_style == TitleStyle::MainHeader
94+
&& g == 0
95+
&& group_len > 1
96+
{
9397
draw_col_separator_end(
9498
renderer,
9599
&mut buffer,

‎tests/formatter.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ fn test_multi_secondary_group_no_snippet() {
350350
];
351351
let expected_ascii = str![[r#"
352352
error: the core problem
353-
|
354353
note: more information
355354
help: a way to fix this
356355
"#]];
@@ -359,7 +358,6 @@ help: a way to fix this
359358

360359
let expected_unicode = str![[r#"
361360
error: the core problem
362-
╰╴
363361
note: more information
364362
help: a way to fix this
365363
"#]];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /