@codemirror/lint 0.20.2 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -290,7 +290,7 @@ function assignKeys(actions) {
|
|
|
290
290
|
function renderDiagnostic(view, diagnostic, inPanel) {
|
|
291
291
|
var _a;
|
|
292
292
|
let keys = inPanel ? assignKeys(diagnostic.actions) : [];
|
|
293
|
-
return elt__default["default"]("li", { class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity }, elt__default["default"]("span", { class: "cm-diagnosticText" }, diagnostic.message), (_a = diagnostic.actions) === null || _a === void 0 ? void 0 : _a.map((action, i) => {
|
|
293
|
+
return elt__default["default"]("li", { class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity }, elt__default["default"]("span", { class: "cm-diagnosticText" }, diagnostic.renderMessage ? diagnostic.renderMessage() : diagnostic.message), (_a = diagnostic.actions) === null || _a === void 0 ? void 0 : _a.map((action, i) => {
|
|
294
294
|
let click = (e) => {
|
|
295
295
|
e.preventDefault();
|
|
296
296
|
let found = findDiagnostic(view.state.field(lintState).diagnostics, diagnostic);
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,11 @@ interface Diagnostic {
|
|
|
31
31
|
*/
|
|
32
32
|
message: string;
|
|
33
33
|
/**
|
|
34
|
+
An optional custom rendering function that displays the message
|
|
35
|
+
as a DOM node.
|
|
36
|
+
*/
|
|
37
|
+
renderMessage?: () => Node;
|
|
38
|
+
/**
|
|
34
39
|
An optional array of actions that can be taken on this
|
|
35
40
|
diagnostic.
|
|
36
41
|
*/
|
package/dist/index.js
CHANGED
|
@@ -282,7 +282,7 @@ function assignKeys(actions) {
|
|
|
282
282
|
function renderDiagnostic(view, diagnostic, inPanel) {
|
|
283
283
|
var _a;
|
|
284
284
|
let keys = inPanel ? assignKeys(diagnostic.actions) : [];
|
|
285
|
-
return elt("li", { class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity }, elt("span", { class: "cm-diagnosticText" }, diagnostic.message), (_a = diagnostic.actions) === null || _a === void 0 ? void 0 : _a.map((action, i) => {
|
|
285
|
+
return elt("li", { class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity }, elt("span", { class: "cm-diagnosticText" }, diagnostic.renderMessage ? diagnostic.renderMessage() : diagnostic.message), (_a = diagnostic.actions) === null || _a === void 0 ? void 0 : _a.map((action, i) => {
|
|
286
286
|
let click = (e) => {
|
|
287
287
|
e.preventDefault();
|
|
288
288
|
let found = findDiagnostic(view.state.field(lintState).diagnostics, diagnostic);
|