Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai 7eed99745a test(plugins): keep the editor panel's problem levels out of the text catalog
The severity map's `hint: "weakWarning"` entry read as UI text to the
text-catalog check (`hint` is a text property), failing it on main since #3885.
A function maps the levels instead.
2026-11-17 12:33:43 +08:00
+3 -7
Переглянути файл
@@ -42,12 +42,8 @@ export interface EditorPanelDecl {
}
/** The marker bar's levels (IDEA's): `info` is a weak warning; hints have no mark. */
const PROBLEM_LEVEL: Record<Severity, EditorProblem["severity"]> = {
error: "error",
warning: "warning",
info: "weakWarning",
hint: "weakWarning",
};
const problemLevel = (severity: Severity): EditorProblem["severity"] =>
severity === "error" || severity === "warning" ? severity : "weakWarning";
const syntaxMarks = new Map<string, Decoration>();
const syntaxMark = (classes: string) => {
@@ -280,7 +276,7 @@ export class PanelEditor implements FrameEditor {
return markerBarProblems(view.state).map((m) => ({
line: doc.lineAt(m.from).number - 1,
lastLine: doc.lineAt(Math.max(m.from, m.to - 1)).number - 1,
severity: PROBLEM_LEVEL[m.severity],
severity: problemLevel(m.severity),
}));
}