Skip to content

jinjava // either buggy or unimplemented #169

Description

@prior

from jinja math docs:

//
Divide two numbers and return the truncated integer result. {{ 20 // 7 }} is 2.

However attempting this with jinjava throws an exception. For example, I would expect this template:

20 // 7 = {{ 20 // 7 }}

to return 20 // 7 = 2, but instead it throws this:

com.hubspot.jinjava.interpret.InterpretException: Error resolving expression [20 // 7]: NullPointerException: 
	at com.hubspot.jinjava.el.ExpressionResolver.resolveExpression(ExpressionResolver.java:89)
	at com.hubspot.jinjava.interpret.JinjavaInterpreter.resolveELExpression(JinjavaInterpreter.java:397)
Caused by: java.lang.NullPointerException
	at jinjava.de.odysseus.el.tree.impl.Parser.mul(Parser.java:547)
	at com.hubspot.jinjava.el.ext.ExtendedParser.add(ExtendedParser.java:149)
	at jinjava.de.odysseus.el.tree.impl.Parser.cmp(Parser.java:462)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions