You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to render HTML in a way that, even if an error occurs, the output still contains as much HTML content as possible. Any unrecognized parts should be output as-is.
If a key is missing or does not exist in the JSON data, {{key}} should output an empty string instead of throwing an error. Otherwise, the error tolerance would be too poor. For example:
nlohmann::json data;
data["name"] = "world";
auto result = inja::render(R"(Guest List:
##for guest in guests
{{ loop.index1 }}: {{ guest }}
##endfor )", data);`
I expect the result to be "Guest List:" instead of throwing an exception or stopping execution. The rendering should recognize as much as possible, and any unrecognized parts should be output as-is.
The text was updated successfully, but these errors were encountered:
I want to render HTML in a way that, even if an error occurs, the output still contains as much HTML content as possible. Any unrecognized parts should be output as-is.
If a key is missing or does not exist in the JSON data, {{key}} should output an empty string instead of throwing an error. Otherwise, the error tolerance would be too poor. For example:
I expect the result to be "Guest List:" instead of throwing an exception or stopping execution. The rendering should recognize as much as possible, and any unrecognized parts should be output as-is.
The text was updated successfully, but these errors were encountered: