mirror of
https://github.com/pantor/inja.git
synced 2026-04-05 07:38:52 +00:00
set .cpp in readme
This commit is contained in:
@@ -185,7 +185,7 @@ env.render("Content: {% include \"content\" %}", data); // "Content: Hello Peter
|
||||
render("{% include \"footer.html\" %}", data);
|
||||
```
|
||||
If a corresponding template could not be found in the file system, the *include callback* is called:
|
||||
```
|
||||
```.cpp
|
||||
// The callback takes the current path and the wanted include name and returns a template
|
||||
env.set_include_callback([&env](const std::string& path, const std::string& name) {
|
||||
return env.parse("Hello {{ name }} from " + name);
|
||||
|
||||
Reference in New Issue
Block a user