uset enum flags in visitors
This commit is contained in:
parent
95ec6728af
commit
406f730621
3 changed files with 15 additions and 9 deletions
|
@ -18,10 +18,13 @@ std::string state::outside_section::render(
|
|||
ctx.set_state<in_inverted_section>(token.content());
|
||||
break;
|
||||
case token_type::variable:
|
||||
case token_type::unescaped_variable:
|
||||
case token_type::unescaped_variable: {
|
||||
std::set<visitor::render_node::flag> flags{};
|
||||
if (token.type() == token_type::variable)
|
||||
flags.insert(visitor::render_node::flag::escape_html);
|
||||
return boost::apply_visitor(
|
||||
visitor::render_node(token.type() == token_type::variable),
|
||||
ctx.get_node(token.content()));
|
||||
visitor::render_node(flags), ctx.get_node(token.content()));
|
||||
}
|
||||
case token_type::comment: break;
|
||||
case token_type::text:
|
||||
return token.raw();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue