Skip to content

Instantly share code, notes, and snippets.

@cloose
Last active August 29, 2015 14:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloose/2525b8c7e7142b0e1fdf to your computer and use it in GitHub Desktop.
Save cloose/2525b8c7e7142b0e1fdf to your computer and use it in GitHub Desktop.
CuteMarkEd Refactoring

HtmlPreviewGenerator

MarkdownConverter

document = converter->createDocument(text, converterOptions());
QString htmlBody = converter->transformToHtml(document);

RenderRequest

struct RenderRequest
{
    QString htmlContent;
    QString codeHighlightingStyle;
    Template::RenderOptions options;
};

Template

RenderRequest renderRequest = makeRequest(htmlBody);
QString html = templateRenderer->render(renderRequest);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment