Skip to content

Commit

Permalink
chore: updated marked version to comply with highlightjs and fixed li…
Browse files Browse the repository at this point in the history
…stitem fix
  • Loading branch information
Jurredr committed Dec 23, 2024
1 parent 5a10376 commit 77b6cd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ export class MynahUI {
// Apply global fix for marked listitem content is not getting parsed.
marked.use({
renderer: {
listitem: (item: Tokens.ListItem) => `
listitem: (text: string, task: boolean, checked: boolean) => `
<li>
${item.task ? `<input ${item.checked === true ? 'checked' : ''} disabled type="checkbox">` : ''}
${(item.task ? marked.parseInline : marked.parse)(item.text, { breaks: false }) as string}
${task ? `<input ${checked === true ? 'checked' : ''} disabled type="checkbox">` : ''}
${(task ? marked.parseInline : marked.parse)(text, { breaks: false }) as string}
</li>`
},
});
Expand Down

0 comments on commit 77b6cd8

Please sign in to comment.