mstch/src/mstch.cpp

17 lines
378 B
C++
Raw Normal View History

2015-04-10 02:41:27 +08:00
#include <iostream>
2015-04-12 21:35:13 +08:00
#include "mstch/mstch.hpp"
#include "render_context.hpp"
2015-04-12 22:19:55 +08:00
#include "utils.hpp"
2015-04-10 02:41:27 +08:00
using namespace mstch;
std::string mstch::render(
2015-04-11 22:29:12 +08:00
const std::string& tmplt,
const object& root_object,
2015-04-10 02:41:27 +08:00
const std::map<std::string,std::string>& partials)
{
2015-04-10 18:56:08 +08:00
return render_context(root_object, partials)
.render(strip_whitespace(tmplt));
2015-04-10 02:41:27 +08:00
}