diff --git a/packages/docs/src/content/docs/features/reporters.md b/packages/docs/src/content/docs/features/reporters.md index 16bcb7f0..e799244b 100644 --- a/packages/docs/src/content/docs/features/reporters.md +++ b/packages/docs/src/content/docs/features/reporters.md @@ -112,7 +112,8 @@ in a closed state initially. The reporter renders this: ````text $ knip --reporter disclosure -
Unused files (2) +
+Unused files (2) ``` unused.ts @@ -121,7 +122,8 @@ dangling.js
-
Unused dependencies (2) +
+Unused dependencies (2) ``` unused-dep package.json @@ -134,7 +136,8 @@ my-package package.json The above can be copy-pasted where HTML and Markdown is supported, such as a GitHub issue or pull request, and renders like so: -
Unused files (2) +
+Unused files (2) ``` unused.ts @@ -143,7 +146,8 @@ dangling.js
-
Unused dependencies (2) +
+Unused dependencies (2) ``` unused-dep package.json diff --git a/packages/knip/src/reporters/disclosure.ts b/packages/knip/src/reporters/disclosure.ts index 025e0d36..78cf0141 100644 --- a/packages/knip/src/reporters/disclosure.ts +++ b/packages/knip/src/reporters/disclosure.ts @@ -5,7 +5,7 @@ import { relative, toRelative } from '../util/path.js'; import { getTitle } from './util.js'; const printHeader = (size: number, title?: string) => - console.log(`
${title ? `${title} (${size})` : ''}\n\n\`\`\``); + console.log(`
\n${title ? `${title} (${size})\n` : ''}\n\`\`\``); const printFooter = () => console.log('```\n\n
\n');