pantor
804823dbca
filesystem::path fixes
2025-03-31 22:54:04 +02:00
pantor
9b6587135c
move to std::filesystem
2025-03-31 22:45:01 +02:00
pantor
ad22893c2c
variable_counter to size_t
2025-03-31 22:31:39 +02:00
Florian Sattler
34514c2658
Prevent local stack memory leakage when parsing ( #302 )
...
We need to resets current_block to a nullptr after parsing the template
in `parse_into`, otherwise, current_block will refer to local stack
space after we return from Parser::parse.
2025-03-18 20:20:34 -05:00
Florian Sattler
808c3711d0
Removes unnecessary template content copy ( #301 )
...
By taking the template content by value and moving into the local
member, we can prevent and additional copy of 'content' when creating a
Template.
2025-03-18 20:20:02 -05:00
Vladislav Navrocky
384a6bef3f
Fix: Remove circular dependencies in headers ( #295 )
...
* Remove circular dependencies in headers
* Fix unit test includes and test data directory location
2025-02-11 09:03:42 +01:00
pantor
de5e742654
make environment config protected members, resolves #285
2024-10-05 09:49:19 +02:00
Matheus Werny
92994bec0a
clang-tidy applied and CMake installation of the single header added ( #287 )
...
* Fixed headers and linter marks applied
Headers were wrong.
Applied some linter suggestions. There are still many left.
* CMake adjusted for single header
CMake can now install the single header.
Removed an unneeded header.
---------
Co-authored-by: Berscheid <1885260+pantor@users.noreply.github.com >
2024-10-05 09:36:11 +02:00
bert hubert
807620c80c
Add HTML autoescape ( #292 )
...
* add and document set_html_autoescape
* add render_to to Environment that accepts a string (and turns it into a Template)
* code style, update single include
* update ci
* revert macos-14 test
---------
Co-authored-by: pantor <lars.berscheid@online.de >
2024-10-05 09:08:46 +02:00
ascii
c360b19855
Add capitalize function ( #282 )
...
* Add capitalize function
* Remove msvc warning
2024-09-19 06:03:33 -07:00
Anthony
0066e6049e
Fix not rendering uint64_t values greater than the int64_t max value ( #278 )
...
* Fix not properly rendering uint64_t values greater than the int64_t max value
* Move render check to variables subcase
2023-11-07 06:42:27 -05:00
pantor
3e0c30f27f
static load file
2023-09-03 16:26:32 +02:00
pantor
c2ad85db6d
fix msvc conversion warning
2023-05-16 07:37:17 +02:00
Yaraslau
f7160c405a
fix extra ‘;’ after in-class function definition ( #268 )
2023-05-14 12:10:42 +02:00
Mai-Lapyst
3741c73ba7
Fixes the json exception when using "\\" inside a string; closes #257 ( #264 )
2023-03-19 20:00:22 +01:00
pantor
aeb43b44f1
update copyright year
2023-01-29 13:24:00 +01:00
pantor
b2276440be
bump to v3.4.0
2023-01-29 13:10:03 +01:00
Kubo Takehiro
d462b9f829
Fix issue 246 ( #247 )
...
* Add `parse_expression` with one argument in preparation to fix #246 .
* Fix issue #246 : `func(n1 + n2, n3)` runs as if `func(n1, n2 + n3)`
* Simplify parser for an expression enclosed by parentheses.
2022-12-04 11:28:04 +01:00
pantor
edc17798b3
Merge branch 'master' of github.com:pantor/inja
2022-07-10 13:46:36 +02:00
pantor
9f923b3677
add check for too few arguments in operator parser
2022-07-10 13:46:33 +02:00
Mihai Stan
17a59c0b78
fix warnings with VS2019, W4, c++20 ( #230 )
...
* fix warnings with VS2019, W4, c++20
* update single include
Co-authored-by: Berscheid <1885260+pantor@users.noreply.github.com >
Co-authored-by: pantor <lars.berscheid@online.de >
2022-06-20 12:06:28 +02:00
pantor
72f90122a2
fix tests
2022-06-20 11:44:50 +02:00
pantor
771e47f6da
fix search directory for string templates
2022-06-20 11:43:45 +02:00
pantor
4526fb4007
remove const from static cast
2022-06-20 11:02:47 +02:00
pantor
a9ce204b3b
use json data types in renderer
2022-06-20 10:57:20 +02:00
pantor
59933e5e6f
update dependencies
2022-06-20 10:39:56 +02:00
pantor
defee6fdf8
make environment paths protected
2022-05-29 15:42:32 +02:00
pantor
b2c0dddafe
improve lexing of numbers
2021-11-17 12:13:22 +01:00
pantor
ab6d006443
works with JSON_NO_IO
2021-11-17 10:39:53 +01:00
pantor
eb04bfc7d3
clang-format
2021-11-12 08:35:56 +01:00
pantor
81cfa140e4
init LiteralNode with string view, code cleaning
2021-11-12 08:13:42 +01:00
pantor
2da715a12a
parse_filename without json
2021-11-12 08:06:56 +01:00
pantor
623c267383
make_result and code cleaning
2021-11-11 22:05:21 +01:00
pantor
120691339d
rename json -> data
2021-11-10 12:53:27 +01:00
pantor
2239e231bc
remove string view polyfill
2021-11-10 12:14:54 +01:00
pantor
cf71b54151
add include callback
2021-09-07 10:00:33 +02:00
pantor
9b9dd96a46
introduce INJA_DATA_TYPE
2021-09-06 09:15:48 +02:00
pantor
12a2c9bbf2
unify json data type
2021-09-01 16:40:43 +02:00
pantor
2d515078c6
set version 3.3
2021-07-28 16:38:53 +02:00
pantor
2ba5783705
Merge branch 'master' of github.com:pantor/inja
2021-07-25 14:24:51 +02:00
pantor
99b85d69e7
remove headers in files, add central header
2021-07-25 14:24:49 +02:00
逐雁南飛
14f0d38cac
Fixed an issue with round ( #207 )
...
* Fix the problem that the result has a decimal point when the round function, when the precision is 0.
* fix tests/test-functions.cpp:91 for round check
2021-07-01 07:59:00 +02:00
Wim Leflere
91c93bfb77
add join function ( #204 )
...
* add join function
* fix formatting to match single include
* add join test
* add join to documentation
* fix MSVC warning: signed/unsigned mismatch
Co-authored-by: Wim Leflere <wleflere@cochlear.com >
2021-06-17 20:54:22 +02:00
pantor
9cf7db8a06
add warnings for benchmark, fix for inja_throw
2021-06-17 20:03:40 +02:00
pantor
e91a2fd350
#ifndef INJA_THROW
2021-06-17 19:56:22 +02:00
pantor
8d65633b6a
add warnings for clang and fix them
2021-06-17 19:48:28 +02:00
pantor
4e909475ea
at function for objects
2021-06-09 22:26:07 +02:00
Bryce Adelstein Lelbach aka wash
798a0b92b1
Add support for setting subobjects via JSON pointer in set statements. ( #202 )
...
E.g. `{% set x.y = 1 %}` sets the `y` member of `x` to 1.
2021-06-09 21:39:16 +02:00
pantor
d9ad8d195b
whitespace control for comments
2021-06-09 21:33:47 +02:00
pantor
95af782ca2
Add Child Inheritance Feature ( #198 )
...
* add block and extend feature
* constify, code cleaning
* update single include
* add html language to readme
* clean tests
* constantify, update year
2021-05-25 10:18:21 +02:00