| 19 | #include "Markdown.h" |
| 20 | |
| 21 | QString markdownToHTML(const QString& markdown) |
| 22 | { |
| 23 | const QByteArray markdownData = markdown.toUtf8(); |
| 24 | char* buffer = cmark_markdown_to_html(markdownData.constData(), markdownData.length(), CMARK_OPT_NOBREAKS | CMARK_OPT_UNSAFE); |
| 25 | |
| 26 | QString htmlStr(buffer); |
| 27 | |
| 28 | free(buffer); |
| 29 | |
| 30 | return htmlStr; |
| 31 | } |
no outgoing calls
no test coverage detected