mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-05 21:34:14 +01:00
feat: Allow html tags in markdown
This commit is contained in:
@@ -75,7 +75,7 @@ export function markdownToHTML(markdown: string, { markdownAutoWrap }: MermaidCo
|
|||||||
return `<em>${node.children.map(output).join('')}</em>`;
|
return `<em>${node.children.map(output).join('')}</em>`;
|
||||||
} else if (node.type === 'paragraph') {
|
} else if (node.type === 'paragraph') {
|
||||||
return `<p>${node.children.map(output).join('')}</p>`;
|
return `<p>${node.children.map(output).join('')}</p>`;
|
||||||
} else if (node.type === 'html' && /^<br\s*\/?>$/i.test(node.value)) {
|
} else if (node.type === 'html') {
|
||||||
return `${node.value}`;
|
return `${node.value}`;
|
||||||
}
|
}
|
||||||
return `Unsupported markdown: ${node.type}`;
|
return `Unsupported markdown: ${node.type}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user