2015-04-17 03:05:59 +08:00
|
|
|
class nested_higher_order_sections: public mstch::object {
|
|
|
|
public:
|
|
|
|
nested_higher_order_sections() {
|
2015-04-17 08:07:14 +08:00
|
|
|
register_method("bold", this, &nested_higher_order_sections::bold);
|
|
|
|
register_method("person", this, &nested_higher_order_sections::person);
|
2015-04-17 03:05:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
mstch::node bold() {
|
|
|
|
return std::string{""};
|
|
|
|
/*return [](const std::string& text, mstch::renderer render) {
|
|
|
|
return std::string{"<b>"} + render(text) + std::string{"</b>"};
|
|
|
|
};*/
|
|
|
|
};
|
|
|
|
|
|
|
|
mstch::node person() {
|
|
|
|
return mstch::map{{"name", std::string{"Jonas"}}};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const mstch::node nested_higher_order_sections_data = std::make_shared<nested_higher_order_sections>();
|