Jade4J for 循环无法评估

Jade4J for loop unable to evaluate

我似乎无法在任何地方找到这个问题的答案,github 因为它没有更新,我打算把我的电脑扔掉 window。

我正在尝试通过 java 创建一个网站,并且正在使用 Jade4J 实现来使用 Jade。

这是我的简单 jade 文件:(没有出现缩进,它们在那里)

html
title Whatup
-for(var i = 0; i < 3; i++)
    h4 Haithere

我得到的只是这个错误:

unable to evaluate [for(var i = 0; i < 3; i++)] - Parsing de.neuland.jade4j.expression.JexlExpressionHandler.evaluateExpression@1:11 parsing error near '... r i = 0; i ...' in test.jade:3

这在 Node 或 Jade 的任何其他实现中工作得很好...

任何想法...请

这似乎是 others as well 的问题。您可以编写本机 JavaScript 函数来创建基于一系列值的数组。

html
  title Whatup
  -function range(start, end) {
  -    var arr = [];
  -    for (var i = start; i < end; i++) arr.push(i);
  -    return arr;
  -  }
  each i in range(0, 3)
      h4 Haithere

生产:

<html>
  <title>Whatup</title>
  <h4>Haithere</h4>
  <h4>Haithere</h4>
  <h4>Haithere</h4>
</html>