@codemirror/lint
Advanced tools
Comparing version 0.20.2 to 0.20.3
@@ -0,1 +1,7 @@ | ||
## 0.20.3 (2022-05-25) | ||
### New features | ||
Diagnostic objects may now have a `renderMessage` method to render their message to the DOM. | ||
## 0.20.2 (2022-05-02) | ||
@@ -2,0 +8,0 @@ |
@@ -34,2 +34,7 @@ import * as _codemirror_state from '@codemirror/state'; | ||
/** | ||
An optional custom rendering function that displays the message | ||
as a DOM node. | ||
*/ | ||
renderMessage?: () => Node; | ||
/** | ||
An optional array of actions that can be taken on this | ||
@@ -36,0 +41,0 @@ diagnostic. |
@@ -285,3 +285,3 @@ import { Decoration, showPanel, EditorView, ViewPlugin, hoverTooltip, logException, gutter, showTooltip, getPanel, WidgetType, GutterMarker } from '@codemirror/view'; | ||
let keys = inPanel ? assignKeys(diagnostic.actions) : []; | ||
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) => { | ||
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) => { | ||
let click = (e) => { | ||
@@ -288,0 +288,0 @@ e.preventDefault(); |
{ | ||
"name": "@codemirror/lint", | ||
"version": "0.20.2", | ||
"version": "0.20.3", | ||
"description": "Linting support for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67574
1618