From 0540d995f65d5780ac783b59e820c2ab2c535902 Mon Sep 17 00:00:00 2001 From: Aolinge <153434584+aolingge@users.noreply.github.com> Date: Sun, 11 Oct 2026 13:44:23 +0800 Subject: [PATCH] fix: make prompt and text HTML reports readable on mobile --- CHANGELOG.md | 4 ++++ src/prompt/promptYamlLint.ts | 14 +++++++++++--- src/text/textAudit.ts | 10 +++++++++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e00adf..de25e8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Make prompt-lint and text-audit HTML reports readable on mobile screens, wrapping long paths and table content; identify the text-audit document language. + ## 0.1.0 - Added the first productized CLI: `scan`, `doctor`, and `init`. diff --git a/src/prompt/promptYamlLint.ts b/src/prompt/promptYamlLint.ts index 26e46fe..a33de5d 100644 --- a/src/prompt/promptYamlLint.ts +++ b/src/prompt/promptYamlLint.ts @@ -193,8 +193,16 @@ function formatPromptHtml(report: PromptLintReport): string { const rows = report.results.map((result) => `${escapeHtml(result.status)}${escapeHtml(result.check)}${escapeHtml(result.message)}`).join(""); return ` -Prompt YAML Lint Report - +Prompt YAML Lint Report + +

Prompt YAML Lint Report

Score: ${report.score}/100

File: ${escapeHtml(report.file)}

@@ -202,7 +210,7 @@ function formatPromptHtml(report: PromptLintReport): string { StatusCheckMessage ${rows} - +
`; } diff --git a/src/text/textAudit.ts b/src/text/textAudit.ts index 2784a64..ad3248e 100644 --- a/src/text/textAudit.ts +++ b/src/text/textAudit.ts @@ -382,7 +382,15 @@ ${rows} function formatHtml(report: TextAuditReport): string { const rows = report.results.map((item) => `${escapeHtml(item.status)}${escapeHtml(item.check)}${escapeHtml(item.message)}`).join(""); - return `${escapeHtml(report.title)} Report

${escapeHtml(report.title)} Report

Score: ${report.score}/100

Profile: ${escapeHtml(report.profile)}

${rows}
StatusCheckMessage
`; + return `${escapeHtml(report.title)} Report +

${escapeHtml(report.title)} Report

Score: ${report.score}/100

Profile: ${escapeHtml(report.profile)}

${rows}
StatusCheckMessage
`; } function formatAnnotations(report: TextAuditReport): string {