@brightspace-ui/core 3.98.2 → 3.98.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.
Files changed (2) hide show
  1. package/helpers/mathjax.js +10 -0
  2. package/package.json +2 -2
@@ -61,6 +61,16 @@ class HtmlBlockMathRenderer {
61
61
  elm.style.height = '0.5rem';
62
62
  });
63
63
 
64
+ // WIRIS outputs bad syntax for empty sub/superscripts, but changing these on write
65
+ // can be risky. Instead, change them on render to minimize potential damage if this
66
+ // impacts legitimate usages.
67
+ if (context.replaceNoneSubSuperScripts) {
68
+ elem.querySelectorAll('math mmultiscripts > none').forEach(elm => {
69
+ const mrow = document.createElementNS('http://www.w3.org/1998/Math/MathML', 'mrow');
70
+ elm.replaceWith(mrow);
71
+ });
72
+ }
73
+
64
74
  // If we're using deferred rendering, we need to create a document structure
65
75
  // within the element so MathJax can appropriately process math.
66
76
  if (!options.noDeferredRendering) elem.innerHTML = `<mjx-doc><mjx-head></mjx-head><mjx-body>${elem.innerHTML}</mjx-body></mjx-doc>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.98.2",
3
+ "version": "3.98.3",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",
@@ -60,7 +60,7 @@
60
60
  "rollup-plugin-copy": "^3",
61
61
  "rollup-plugin-delete": "^3",
62
62
  "sass": "^1",
63
- "sinon": "^19",
63
+ "sinon": "^20",
64
64
  "stylelint": "^16",
65
65
  "web-component-analyzer": "^2"
66
66
  },