Skip to content

Commit

Permalink
Added missing initialization of Mermaid (#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Mar 20, 2016
1 parent 960f93b commit ecadda5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion phpmyfaq/artikel.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@
// Add Glossary entries for answers only
$question = $faq->getRecordTitle($recordId);
if ($faqConfig->get('main.enableMarkdownEditor')) {
$answer = $parsedown->text($faq->faqRecord['content']);
$answer = sprintf(
'<div class="mermaid">%s</div>',
$parsedown->text($faq->faqRecord['content'])
);
$answer .= '<script>mermaid.initialize({startOnLoad:true});</script>';
} else {
$answer = $faq->faqRecord['content'];
}
Expand Down

0 comments on commit ecadda5

Please sign in to comment.