Skip to content

Commit

Permalink
Merge pull request #1851 from stefanobaghino-da/bump-to-marked-4.0.10
Browse files Browse the repository at this point in the history
Bump marked from 3.0.8 to 4.0.10
  • Loading branch information
Gerrit0 committed Jan 18, 2022
2 parents 70633ed + d959b71 commit 3bc9c78
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 23 deletions.
114 changes: 97 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"glob": "^7.2.0",
"lunr": "^2.3.9",
"marked": "^3.0.8",
"marked": "^4.0.10",
"minimatch": "^3.0.4",
"shiki": "^0.9.12"
},
Expand All @@ -33,7 +33,7 @@
"devDependencies": {
"@types/glob": "^7.2.0",
"@types/lunr": "^2.3.4",
"@types/marked": "^3.0.3",
"@types/marked": "^4.0.1",
"@types/minimatch": "3.0.5",
"@types/mocha": "^9.0.0",
"@types/node": "^16.11.9",
Expand Down
8 changes: 4 additions & 4 deletions src/lib/output/themes/MarkedPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ output file :
protected override onBeginRenderer(event: RendererEvent) {
super.onBeginRenderer(event);

Marked.setOptions(this.createMarkedOptions());
Marked.marked.setOptions(this.createMarkedOptions());

delete this.includes;
if (this.includeSource) {
Expand Down Expand Up @@ -190,10 +190,10 @@ output file :
*
* @returns The options object for the markdown parser.
*/
private createMarkedOptions(): Marked.MarkedOptions {
private createMarkedOptions(): Marked.marked.MarkedOptions {
const markedOptions = (this.application.options.getValue(
"markedOptions"
) ?? {}) as Marked.MarkedOptions;
) ?? {}) as Marked.marked.MarkedOptions;

// Set some default values if they are not specified via the TypeDoc option
markedOptions.highlight ??= (text: any, lang: any) =>
Expand All @@ -210,6 +210,6 @@ output file :
* @param event
*/
onParseMarkdown(event: MarkdownEvent) {
event.parsedText = Marked(event.parsedText);
event.parsedText = Marked.marked(event.parsedText);
}
}

0 comments on commit 3bc9c78

Please sign in to comment.