| 48 | } |
| 49 | |
| 50 | void HtmlPreviewGenerator::markdownTextChanged(const QString &text) |
| 51 | { |
| 52 | // cut YAML header |
| 53 | YamlHeaderChecker checker(text); |
| 54 | QString actualText = checker.hasHeader() && options->isYamlHeaderSupportEnabled() ? |
| 55 | checker.body() |
| 56 | : text; |
| 57 | // enqueue task to parse the markdown text and generate a new HTML document |
| 58 | QMutexLocker locker(&tasksMutex); |
| 59 | tasks.enqueue(actualText); |
| 60 | bufferNotEmpty.wakeOne(); |
| 61 | } |
| 62 | |
| 63 | QString HtmlPreviewGenerator::exportHtml(const QString &styleSheet, const QString &highlightingScript) |
| 64 | { |
no test coverage detected