@khanacademy/perseus-linter 0.0.0-PR3058-20251121000524 → 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/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.4.7";perseusUtils.addLibraryVersionToPerseusDebug(libName,libVersion);
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&&context.widgets&&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."}}});
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}`});