@mui/internal-markdown 2.0.4 → 2.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-markdown",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
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.mjs",
@@ -21,9 +21,9 @@
21
21
  "directory": "packages/markdown"
22
22
  },
23
23
  "dependencies": {
24
- "@babel/runtime": "^7.27.0",
24
+ "@babel/runtime": "^7.27.1",
25
25
  "lodash": "^4.17.21",
26
- "marked": "^15.0.7",
26
+ "marked": "^15.0.11",
27
27
  "prismjs": "^1.30.0"
28
28
  },
29
29
  "devDependencies": {
package/parseMarkdown.mjs CHANGED
@@ -145,8 +145,8 @@ function getHeaders(markdown) {
145
145
  value = value.replace(/,\s+\]$/g, ']');
146
146
  headers[key] = JSON.parse(value);
147
147
  } else {
148
- // Remove trailing single quote yml escaping.
149
- headers[key] = value.replace(/^'|'$/g, '');
148
+ // Remove quote YAML escaping.
149
+ headers[key] = value.replace(/^"|"$|^'|'$/g, '');
150
150
  }
151
151
  }
152
152
 
@@ -87,9 +87,6 @@ authors: ['foo', 'bar']
87
87
  ---
88
88
  title: React Alert component
89
89
  components: Alert, AlertTitle
90
- githubLabel: 'component: alert'
91
- packageName: '@mui/lab'
92
- waiAria: https://www.w3.org/TR/wai-aria-practices/#alert
93
90
  authors:
94
91
  ['foo', 'bar']
95
92
  ---
@@ -97,10 +94,7 @@ authors:
97
94
  ).to.deep.equal({
98
95
  components: ['Alert', 'AlertTitle'],
99
96
  hooks: [],
100
- githubLabel: 'component: alert',
101
- packageName: '@mui/lab',
102
97
  title: 'React Alert component',
103
- waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert',
104
98
  authors: ['foo', 'bar'],
105
99
  });
106
100
  });
@@ -111,9 +105,6 @@ authors:
111
105
  ---
112
106
  title: React Alert component
113
107
  components: Alert, AlertTitle
114
- githubLabel: 'component: alert'
115
- packageName: '@mui/lab'
116
- waiAria: https://www.w3.org/TR/wai-aria-practices/#alert
117
108
  authors:
118
109
  [
119
110
  'foo',
@@ -124,13 +115,24 @@ authors:
124
115
  ).to.deep.equal({
125
116
  components: ['Alert', 'AlertTitle'],
126
117
  hooks: [],
127
- githubLabel: 'component: alert',
128
- packageName: '@mui/lab',
129
118
  title: 'React Alert component',
130
- waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert',
131
119
  authors: ['foo', 'bar'],
132
120
  });
133
121
  });
122
+
123
+ it('should work with quotes', () => {
124
+ expect(
125
+ getHeaders(`
126
+ ---
127
+ title: "Our docs just got a major upgrade—here's what that means for you"
128
+ ---
129
+ `),
130
+ ).to.deep.equal({
131
+ title: "Our docs just got a major upgrade—here's what that means for you",
132
+ components: [],
133
+ hooks: [],
134
+ });
135
+ });
134
136
  });
135
137
 
136
138
  describe('getContents', () => {