Skip to content

Commit

Permalink
feat: permettre le lien + gras depuis le CMS (#949)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo-OCTO authored Feb 25, 2025
1 parent 10bef9f commit 2d23b78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shell/actionMarkdownToHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import { marked } from 'marked';
const renderer = new marked.Renderer();

renderer.strong = objet => {
return `<span class="text--bold">${objet.text}</span>`;
const text = marked.parseInline(objet.text);
return `<span class="text--bold">${text}</span>`;
};

renderer.heading = ({ tokens, depth }) => {
const text = marked.parseInline(tokens.map(token => token.raw).join(''));
if (depth === 1) {
Expand Down

0 comments on commit 2d23b78

Please sign in to comment.