#include #include "mstch/mstch.hpp" #include "render_context.hpp" using namespace mstch; std::string mstch::render( const std::string& tmplt, const node& root, const std::map& partials) { std::map partial_templates; for (auto& partial: partials) partial_templates.insert({partial.first, {partial.second}}); return render_context(root, partial_templates).render(tmplt); }