@khanacademy/perseus-linter 0.0.0-PR3058-20251121000311 → 0.0.0-PR3058-20251121224337
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/dist/es/index.js +2 -2
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ function _interopNamespaceCompat(e) {
|
|
|
27
27
|
|
|
28
28
|
var KAS__namespace = /*#__PURE__*/_interopNamespaceCompat(KAS);
|
|
29
29
|
|
|
30
|
-
const libName="@khanacademy/perseus-linter";const libVersion="4.
|
|
30
|
+
const libName="@khanacademy/perseus-linter";const libVersion="4.5.0";perseusUtils.addLibraryVersionToPerseusDebug(libName,libVersion);
|
|
31
31
|
|
|
32
32
|
const linterContextDefault={contentType:"",highlightLint:false,paths:[],stack:[]};
|
|
33
33
|
|
|
@@ -103,7 +103,7 @@ var LongParagraph = Rule.makeRule({name:"long-paragraph",severity:Rule.Severity.
|
|
|
103
103
|
This paragraph is ${content.length} characters long.
|
|
104
104
|
Shorten it to 500 characters or fewer.`}});
|
|
105
105
|
|
|
106
|
-
var MatcherWidgetError = Rule.makeRule({name:"matcher-widget-error",severity:Rule.Severity.ERROR,selector:"widget",lint:function(state,content,nodes,match,context){if(state.currentNode().widgetType!=="matcher"){return}const nodeId=state.currentNode().id;if(!nodeId){return}const widget=context
|
|
106
|
+
var MatcherWidgetError = Rule.makeRule({name:"matcher-widget-error",severity:Rule.Severity.ERROR,selector:"widget",lint:function(state,content,nodes,match,context){if(state.currentNode().widgetType!=="matcher"){return}const nodeId=state.currentNode().id;if(!nodeId){return}const widget=context?.widgets?.[nodeId];if(!widget){return}if(widget.options.left.length!==widget.options.right.length){return "The two halves of the matcher have different numbers of cards."}}});
|
|
107
107
|
|
|
108
108
|
var MathAdjacent = Rule.makeRule({name:"math-adjacent",severity:Rule.Severity.WARNING,selector:"blockMath+blockMath",message:`Adjacent math blocks:
|
|
109
109
|
combine the blocks between \\begin{align} and \\end{align}`});
|