f5cce3dcb1
feat: add INJA_VERSION_MAJOR/MINOR/PATCH macros ( #341 ) ( #344 )
...
* feat: add INJA_VERSION_MAJOR/MINOR/PATCH macros (#341 )
Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
* feat: add INJA_VERSION_MAJOR/MINOR/PATCH macros (#341 )
Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
* Undo capitalize changes
---------
Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
Co-authored-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
Co-authored-by: Berscheid <1885260+pantor@users.noreply.github.com >
2026-08-18 08:26:06 +02:00
fb1437ba59
fix: return empty string from capitalize on empty input ( #337 ) ( #343 )
...
* fix: return empty string from capitalize on empty input (#337 )
Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
* fix: return empty string from capitalize on empty input (#337 )
Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
* fix: return empty string from capitalize on empty input (#337 )
Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
---------
Signed-off-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
Co-authored-by: sofiamartincraft <sofiamartincraft@users.noreply.github.com >
2026-08-18 08:17:04 +02:00
pantor
94289188ea
update single include
2026-07-20 09:28:28 +02:00
751eab3906
resolve MSVC warning ( #321 ) ( #322 )
...
* move warning producing statement after default switch case to within the default case
* remove redundant nullptr assignment in default switch case
* Update single include
---------
Co-authored-by: Berscheid <1885260+pantor@users.noreply.github.com >
2026-01-09 14:03:19 +01:00
pantor
7d1b4600b6
fix more clang-tidy warnings
2025-10-18 07:00:03 -07:00
pantor
d222ad2d98
fix more clang-tidy warnings
2025-10-18 06:54:13 -07:00
pantor
ebf4d0f42d
fix some clang-tidy warnings
2025-10-18 06:49:33 -07:00
pantor
5b4d92c473
bump to v.3.5.0
2025-10-18 06:43:15 -07:00
pantor
4c6b263c2f
fix some clang-tidy warnings
2025-10-18 06:42:10 -07:00
Vladislav Nawrocki and GitHub
ea845eee91
Add pipe syntax support for function calls like in Jinja2, resolves #294 ( #296 )
2025-10-18 05:35:57 -07:00
2d6b382e2a
add replace function ( #306 )
...
Co-authored-by: Felix Maier <fm41@mailbox.org >
2025-09-06 16:38:04 +02:00
2d1f0d09e6
Make htmlescape function public ( #300 )
...
Co-authored-by: Berscheid <1885260+pantor@users.noreply.github.com >
2025-04-13 11:31:15 +02:00
Huang Rui and GitHub
ca53920be2
Initialize missing fields in Lexer constructor ( #304 )
...
* Initialize missing fields in Lexer constructor
- Add tok_start and pos initialization to Lexer constructor
- Fix clang-tidy uninitialized fields warning
Signed-off-by: Huang Rui <vowstar@gmail.com >
* Fix argument type mismatch for load_file and load_json methods
- Use .string() method for path objects in benchmark file loading
- Apply same path conversion in test cases for consistency
Signed-off-by: Huang Rui <vowstar@gmail.com >
* Fix and cleanup mismatch error in windows test case
- Use .string() method for path objects in benchmark file loading
- Fix test case failure introduced in https://github.com/pantor/inja/commit/65aa8a669dfa1d7aae4aed457cbf8834f33ad419
Signed-off-by: Huang Rui <vowstar@gmail.com >
---------
Signed-off-by: Huang Rui <vowstar@gmail.com >
2025-04-13 11:16:44 +02:00
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 and GitHub
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 and GitHub
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 and GitHub
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
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
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 and GitHub
c360b19855
Add capitalize function ( #282 )
...
* Add capitalize function
* Remove msvc warning
2024-09-19 06:03:33 -07:00
Anthony and GitHub
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
pantor
c0f7d91723
fix extra ';' in single include
2023-05-14 12:11:51 +02:00
Mai-Lapyst and GitHub
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 and GitHub
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
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
5a4ac92137
update single include
2021-09-07 10:01:52 +02:00
pantor
cf71b54151
add include callback
2021-09-07 10:00:33 +02:00