markdown.rs: make first line a top-level heading (#1511)

Fixes [`MD041` - First line in a file should be a top-level heading](https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md041.md)
This commit is contained in:
Sebastiaan Speck 2024-10-06 17:41:27 +02:00 committed by GitHub
parent 829f5f3e72
commit d8253a11f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,7 +96,7 @@ impl Display for MarkdownResponseStats {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let stats = &self.0;
writeln!(f, "## Summary")?;
writeln!(f, "# Summary")?;
writeln!(f)?;
writeln!(f, "{}", stats_table(&self.0))?;
@ -237,7 +237,7 @@ mod tests {
original: Url::parse("https://example.com/original").unwrap(),
});
let summary = MarkdownResponseStats(stats);
let expected = "## Summary
let expected = "# Summary
| Status | Count |
|---------------|-------|