@mui/internal-markdown 1.0.13 → 1.0.14

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/loader.js CHANGED
@@ -85,7 +85,7 @@ module.exports = async function demoLoader() {
85
85
  if (
86
86
  filename.startsWith(englishFilename) &&
87
87
  matchNotEnglishMarkdown !== null &&
88
- options.languagesInProgress.indexOf(matchNotEnglishMarkdown[1]) !== -1
88
+ options.languagesInProgress.includes(matchNotEnglishMarkdown[1])
89
89
  ) {
90
90
  return {
91
91
  filename,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-markdown",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "author": "MUI Team",
5
5
  "description": "MUI markdown parser. This is an internal package not meant for general use.",
6
6
  "main": "./index.js",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "https://github.com/mui/material-ui.git",
15
+ "url": "git+https://github.com/mui/material-ui.git",
16
16
  "directory": "packages/markdown"
17
17
  },
18
18
  "dependencies": {
package/parseMarkdown.js CHANGED
@@ -79,7 +79,7 @@ function checkUrlHealth(href, linkText, context) {
79
79
  * It needs to be:
80
80
  * /material-ui/customization/theming/
81
81
  */
82
- if (url.pathname[url.pathname.length - 1] !== '/') {
82
+ if (!url.pathname.endsWith('/')) {
83
83
  throw new Error(
84
84
  [
85
85
  'docs-infra: Missing trailing slash. The following link:',
@@ -145,7 +145,7 @@ function getHeaders(markdown) {
145
145
  while ((regexMatches = headerKeyValueRegExp.exec(header)) !== null) {
146
146
  const key = regexMatches[1];
147
147
  let value = regexMatches[2].replace(/(.*)/, '$1');
148
- if (value[0] === '[') {
148
+ if (value.startsWith('[')) {
149
149
  // Need double quotes to JSON parse.
150
150
  value = value.replace(/'/g, '"');
151
151
  // Remove the comma after the last value e.g. ["foo", "bar",] -> ["foo", "bar"].
@@ -275,12 +275,12 @@ const noSEOadvantage = [
275
275
  'https://heroicons.com/',
276
276
  'https://react-icons.github.io/',
277
277
  'https://fontawesome.com/',
278
- 'https://www.radix-ui.com/',
279
278
  'https://react-spectrum.adobe.com/',
280
279
  'https://headlessui.com/',
281
280
  'https://refine.dev/',
282
281
  'https://scaffoldhub.io/',
283
282
  'https://marmelab.com/',
283
+ 'https://framesxdesign.com/',
284
284
  ];
285
285
 
286
286
  /**
@@ -387,7 +387,7 @@ function createRender(context) {
387
387
  more += ` title="${title}"`;
388
388
  }
389
389
 
390
- if (noSEOadvantage.some((domain) => href.indexOf(domain) !== -1)) {
390
+ if (noSEOadvantage.some((domain) => href.includes(domain))) {
391
391
  more = ' target="_blank" rel="noopener nofollow"';
392
392
  }
393
393
 
@@ -36,7 +36,7 @@ function resolveComponentApiUrl(productId, componentPkg, component) {
36
36
  if (productId === 'x-tree-view') {
37
37
  return `/x/api/tree-view/${kebabCase(component)}/`;
38
38
  }
39
- if (componentPkg === 'mui-base' || BaseUIReexportedComponents.indexOf(component) >= 0) {
39
+ if (componentPkg === 'mui-base' || BaseUIReexportedComponents.includes(component)) {
40
40
  return `/base-ui/react-${kebabCase(component)}/components-api/#${kebabCase(component)}`;
41
41
  }
42
42
  if (productId === 'toolpad-core') {