Render as 'null' when variable is undefined

Open
#1,253 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
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

No file, test, or entry point is named in the issue. Start by locating Jinjava's handling of undefined variables and any configuration options for their rendered value; done means Hello, {{name}} renders as Hello, null when name is undefined, with coverage for that behavior.

Written by the indexing model from the issue text.

Description

Hello,

I would like to know if there is a way to configure the interpreter to render undefined variables as null instead of ''.
Example

Hello, {{name}} be rendered as Hello, null when name is undefined.

Thanks!

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.