508 Commits

Author SHA1 Message Date
pantor
38196c846f Merge branch 'main' of github.com:pantor/inja 2026-01-09 14:21:46 +01:00
pantor
fd308b756b bump setup-cpp action 2026-01-09 14:21:43 +01:00
Armaan Chahal
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
Julien Schueller
bad1100a03 Bump minimum cmake version (#323)
Avoids the annoying warning messages such as:

```
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.
```
and allows to get rid of the policy definition
2026-01-09 14:02:30 +01:00
pantor
2bb3cd5cb1 update ci macos runner to 14 2026-01-09 14:02:07 +01:00
Neal Gompa (ニール・ゴンパ)
ebb7aeb3ae cmake: Use GNUInstallDirs for install paths and install pc file (#317)
This ensures that the correct include and library directories are used
regardless of operating system target by leveraging the built-in
GNUInstallDirs logic for determining the right directory paths.

This also fixes the path for the CMake config module files to use
the right location for header-only libraries.

A pc(5) file for pkgconfig is now also created and installed.
2025-11-09 11:55:32 +01:00
pantor
7d1b4600b6 fix more clang-tidy warnings v3.5.0 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
Berscheid
edab682601 Enable clang tidy in CI (#314)
* add clang tidy check

* test

* check

* check

* test

* check

* test

* header filter

* fix header filter

* check

* check

* check

* recheck

* re-check

* undo removing ci
2025-10-18 06:33:11 -07:00
Vladislav Nawrocki
ea845eee91 Add pipe syntax support for function calls like in Jinja2, resolves #294 (#296) 2025-10-18 05:35:57 -07:00
Matthias Klumpp
b3d0e06a95 meson: Install missing headers (#312) 2025-10-18 05:32:19 -07:00
Matthias Klumpp
18ad33abe2 meson: Add pkg-config file (#310) 2025-09-19 07:47:55 -05:00
Felix Maier
2d6b382e2a add replace function (#306)
Co-authored-by: Felix Maier <fm41@mailbox.org>
2025-09-06 16:38:04 +02:00
Gleb Popov
593ff96024 /update_single_include.sh: Use portable shebang (#308) 2025-08-18 10:21:08 +02:00
pantor
0bb32ae85b bump windows CI to 2022/2025 2025-08-18 10:04:31 +02:00
Andrew Kane
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
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 65aa8a669d

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
65aa8a669d move tests to std::filesystem::path 2025-03-31 23:22:36 +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
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
pantor
9416142a50 simplify ci runners 2025-03-18 20:14:48 -05:00
pantor
6280ea8808 update ci runner versions 2025-03-17 21:31:48 -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
17ba53cb9e add clang tidy 2024-10-05 16:47:03 +02:00
pantor
fddbfce5a3 fix benchmark includes, resolves #286 2024-10-05 10:03:29 +02:00
pantor
8695d7525f include building benchmark in test option 2024-10-05 10:01:11 +02:00
pantor
de5e742654 make environment config protected members, resolves #285 2024-10-05 09:49:19 +02:00
pantor
ee8999c127 fix test include directory, resolves #276 2024-10-05 09:46:42 +02:00
pantor
629efa42e2 add macos 14 test 2024-10-05 09:42:28 +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
pantor
1281271fda update third party dependencies 2024-10-05 09:27:35 +02:00
pantor
e69b15064f modernize ci 2024-10-05 09:17:10 +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
67d6fea2b7 Merge branch 'master' of github.com:pantor/inja 2023-09-03 16:38:47 +02:00
pantor
3e0c30f27f static load file 2023-09-03 16:26:32 +02:00
Bren
fe58260752 Set CMake policy 0077 for easy inclusion from other CMake prjs (#262)
Co-authored-by: Bren de Hartog <bren.github@dehartog.name>
2023-09-03 16:11:47 +02:00
Berscheid
fe6d4f4c89 Fix Codacy badge 2023-07-24 08:35:30 +02:00
pantor
c2ad85db6d fix msvc conversion warning 2023-05-16 07:37:17 +02:00
pantor
6b7b9f1604 ci update envs 2023-05-16 07:31:09 +02:00
pantor
c0f7d91723 fix extra ';' in single include 2023-05-14 12:11:51 +02:00
Yaraslau
f7160c405a fix extra ‘;’ after in-class function definition (#268) 2023-05-14 12:10:42 +02:00
Martin Hierholzer
9e92a7c0fa fix: cmake does not find embedded json (#266) 2023-04-06 09:16:29 +02:00