@mui/internal-markdown 1.0.23 → 1.0.24
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/index.d.ts +5 -4
- package/package.json +1 -1
- package/parseMarkdown.js +4 -4
package/index.d.ts
CHANGED
|
@@ -6,10 +6,11 @@ interface TableOfContentsEntry {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export function createRender(context: {
|
|
9
|
-
headingHashes
|
|
10
|
-
toc
|
|
11
|
-
userLanguage
|
|
12
|
-
ignoreLanguagePages
|
|
9
|
+
headingHashes?: Record<string, string>;
|
|
10
|
+
toc?: TableOfContentsEntry[];
|
|
11
|
+
userLanguage?: string;
|
|
12
|
+
ignoreLanguagePages?: (path: string) => boolean;
|
|
13
|
+
options: object;
|
|
13
14
|
}): (markdown: string) => string;
|
|
14
15
|
|
|
15
16
|
export interface MarkdownHeaders {
|
package/package.json
CHANGED
package/parseMarkdown.js
CHANGED
|
@@ -291,13 +291,13 @@ const noSEOadvantage = [
|
|
|
291
291
|
* @property {number} level
|
|
292
292
|
* @property {string} text
|
|
293
293
|
* @param {object} context
|
|
294
|
-
* @param {Record<string, string>} context.headingHashes - WILL BE MUTATED
|
|
295
|
-
* @param {TableOfContentsEntry[]} context.toc - WILL BE MUTATED
|
|
296
|
-
* @param {string} context.userLanguage
|
|
294
|
+
* @param {Record<string, string>} [context.headingHashes] - WILL BE MUTATED
|
|
295
|
+
* @param {TableOfContentsEntry[]} [context.toc] - WILL BE MUTATED
|
|
296
|
+
* @param {string} [context.userLanguage]
|
|
297
297
|
* @param {object} context.options
|
|
298
298
|
*/
|
|
299
299
|
function createRender(context) {
|
|
300
|
-
const { headingHashes, toc, userLanguage, options } = context;
|
|
300
|
+
const { headingHashes = {}, toc = [], userLanguage = 'en', options } = context;
|
|
301
301
|
const headingHashesFallbackTranslated = {};
|
|
302
302
|
let headingIndex = -1;
|
|
303
303
|
|