16 std::string statement_open {
"{%"};
17 std::string statement_open_no_lstrip {
"{%+"};
18 std::string statement_open_force_lstrip {
"{%-"};
19 std::string statement_close {
"%}"};
20 std::string statement_close_force_rstrip {
"-%}"};
21 std::string line_statement {
"##"};
22 std::string expression_open {
"{{"};
23 std::string expression_open_force_lstrip {
"{{-"};
24 std::string expression_close {
"}}"};
25 std::string expression_close_force_rstrip {
"-}}"};
26 std::string comment_open {
"{#"};
27 std::string comment_open_force_lstrip {
"{#-"};
28 std::string comment_close {
"#}"};
29 std::string comment_close_force_rstrip {
"-#}"};
30 std::string open_chars {
"#{"};
32 bool trim_blocks {
false};
33 bool lstrip_blocks {
false};
35 void update_open_chars() {
37 if (open_chars.find(line_statement[0]) == std::string::npos) {
38 open_chars += line_statement[0];
40 if (open_chars.find(statement_open[0]) == std::string::npos) {
41 open_chars += statement_open[0];
43 if (open_chars.find(statement_open_no_lstrip[0]) == std::string::npos) {
44 open_chars += statement_open_no_lstrip[0];
46 if (open_chars.find(statement_open_force_lstrip[0]) == std::string::npos) {
47 open_chars += statement_open_force_lstrip[0];
49 if (open_chars.find(expression_open[0]) == std::string::npos) {
50 open_chars += expression_open[0];
52 if (open_chars.find(expression_open_force_lstrip[0]) == std::string::npos) {
53 open_chars += expression_open_force_lstrip[0];
55 if (open_chars.find(comment_open[0]) == std::string::npos) {
56 open_chars += comment_open[0];
58 if (open_chars.find(comment_open_force_lstrip[0]) == std::string::npos) {
59 open_chars += comment_open_force_lstrip[0];