refactor(admin-web): move answer markdown normalization to a tested lib

Extract normalizeLooseMarkdownLine from TrackingQuestionDetailView into
a shared monitoring-answer-markdown module and harden it (model bullet
`**-` and `*` handling). Add a vitest runner and unit tests for the
normalization rules.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-12 14:57:16 +08:00
parent a04d41b230
commit d2cb2faa61
5 changed files with 50 additions and 17 deletions
+2
View File
@@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"test": "vitest run",
"build": "vue-tsc --noEmit && vite build",
"build:analyze": "vue-tsc --noEmit && ANALYZE=true vite build",
"preview": "vite preview",
@@ -43,6 +44,7 @@
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vite-plugin-compression2": "^2.5.3",
"vitest": "^4.1.5",
"vue-tsc": "^3.2.6"
}
}