-
-
Notifications
You must be signed in to change notification settings - Fork 38
chore: fix legacy inline snapshot format warnings #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,9 @@ mod tests { | |
| fn test_render_markdown_arg() { | ||
| let spec = spec! { r#"arg "arg1" help="arg1 description""# }.unwrap(); | ||
| let ctx = MarkdownRenderer::new(spec.clone()); | ||
| assert_snapshot!(ctx.render_arg(&spec.cmd.args[0]).unwrap(), @"arg1 description"); | ||
| assert_snapshot!(ctx.render_arg(&spec.cmd.args[0]).unwrap(), @r" | ||
|
|
||
|
|
||
| arg1 description"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Snapshot has extra leading newline compared to template outputMedium Severity The inline snapshot appears to contain three leading newlines, but the Tera template ( Additional Locations (1) |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,9 @@ mod tests { | |
| fn test_render_markdown_flag() { | ||
| let spec = spec! { r#"flag "--flag1" help="flag1 description""# }.unwrap(); | ||
| let ctx = MarkdownRenderer::new(spec.clone()).with_replace_pre_with_code_fences(true); | ||
| assert_snapshot!(ctx.render_flag(&spec.cmd.flags[0]).unwrap(), @"flag1 description"); | ||
| assert_snapshot!(ctx.render_flag(&spec.cmd.flags[0]).unwrap(), @r" | ||
|
|
||
|
|
||
| flag1 description"); | ||
|
Comment on lines
+25
to
+28
|
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The snapshot contains two leading blank lines before 'arg1 description'. If these newlines are intentional output from
render_arg(), consider adding a comment explaining why the function produces this formatting, as it's not immediately clear from the test context.