Skip to content

Commit

Permalink
Merge pull request #3024 from gdg-x/marked
Browse files Browse the repository at this point in the history
Update Marked
  • Loading branch information
abraham authored Mar 2, 2024
2 parents 18141b1 + 2552d72 commit cbda599
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@vaadin/router": "^1.7.5",
"firebase": "^10.8.1",
"lit": "^2.8.0",
"marked": "^9.1.6",
"marked": "^12.0.0",
"marked-gfm-heading-id": "^3.1.3",
"pwa-helpers": "^0.9.1",
"register-service-worker": "^1.7.2",
Expand Down
3 changes: 2 additions & 1 deletion src/components/markdown/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export class Markdown extends ThemedElement {

get document(): DocumentFragment {
const template = document.createElement('template');
template.innerHTML = marked.parse(this.content);
// Override type as no async extensions are in use
template.innerHTML = marked.parse(this.content) as string;
if (hasUnsupportedTags(template.content)) {
console.warn(`Invalid Markedown contains some of the following tags ${unsupportedHtmlTags}`);
// TODO: Enable
Expand Down

0 comments on commit cbda599

Please sign in to comment.