Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcere committed Nov 20, 2024
1 parent c26e602 commit 84d4d9e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/src/markdown.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,9 @@ export class MarkdownService {

const defaultCode = renderer.code;
renderer.code = (token) => {
if (token.lang === 'mermaid') {
return `<div class="mermaid">${token.text}</div>`;
}
return defaultCode(token);
return token.lang === 'mermaid'
? `<div class="mermaid">${token.text}</div>`
: defaultCode(token);
};

extendedRenderer.ɵNgxMarkdownRendererExtendedForMermaid = true;
Expand Down

0 comments on commit 84d4d9e

Please sign in to comment.