2 #include <boost/algorithm/string.hpp>
3 #include <boost/algorithm/string/predicate.hpp>
10 using namespace std::literals::string_literals;
29 fail(
"Key must not be empty"s);
30 }
else if (braces.empty()) {
31 result.back().attributes.back().value = boost::trim_copy(value);
38 }
else if (c ==
'{') {
39 braces.push(std::make_pair(context.line, context.column));
40 }
else if (c ==
'}') {
41 replaceSpecialCharacter(value);
43 result.back().attributes.back().value = boost::trim_copy(value);
50 }
else if (std::isgraph(c) || std::isspace(c)) {
53 fail(
"Invalid Character in Value, got so far: ["s + value +
"]"s);
59 if (boost::algorithm::ends_with(s, R
"(\"a)")) {
60 boost::algorithm::replace_last(s, R"(\"a)", "ä");
61 }
else if (boost::algorithm::ends_with(s, R
"(\"o)")) {
62 boost::algorithm::replace_last(s, R"(\"o)", "ö");
63 }
else if (boost::algorithm::ends_with(s, R
"(\"u)")) {
64 boost::algorithm::replace_last(s, R"(\"u)", "ü");
65 }
else if (boost::algorithm::ends_with(s, R
"(\ss)")) {
66 boost::algorithm::replace_last(s, R"(\ss)", "ß");
67 }
else if (boost::algorithm::ends_with(s, R
"(\'a)")) {
68 boost::algorithm::replace_last(s, R"(\'a)", "á");
69 }
else if (boost::algorithm::ends_with(s, R
"(\'e)")) {
70 boost::algorithm::replace_last(s, R"(\'e)", "é");