Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Include does not evaluate path

Open
#816 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

Start at src/main/java/com/hubspot/jinjava/lib/tag/IncludeTag.java around line 68 and trace how the include path is obtained from the tag tokens. Reproduce both concatenation examples and verify that the resolved path is path/to/file.jinja, matching the Python library's behavior; add or update the relevant tests if the repository identifies them.

Written by the indexing model from the issue text.

Description

The path for include tag (and possibly other tags) is not evaluated properly if it consists of string concatenations.

For the following example:
{% include "path" ~ "/to" ~ "/file.jinja" %}
the Include and Exclude Tag end up trying to include the file path instead of the expected path/to/file.jinja.
This is possibly due to IncludeTag.java:68 where the path is determined by only the first token.

Moreover, when we try to "game" the tokenizing process by removing spaces like so:
{% include "path"~"/to"~"/file.jinja" %}
The tags will try to interpret the path path"~"/to"~"/file.jinja without evaluation.

The expected behaviour would be for the path to be evaluated in both examples, as that's what happens using the python library.

Dominant language
Java
Stars
785
Forks
184
Avg merge
6d 22h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HubSpot/jinjava

All issues in HubSpot/jinjava

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.