0

在尝试从 Freemarker 转移到 Rythm 时,我得到的效果是 Rythm 删除了很多空白。

我知道有@compact @nocompact 和@escape 选项。我尝试了其中一些,但它们似乎对空白处理没有影响。根据http://rythmengine.org/doc/configuration.md#codegen_compact_enabled 默认处理是压缩。

节奏似乎删除了我积极尝试插入的空格,例如

no whitespace here
@nocompact() {
  @for (int i=0;i<2;i++) {
    please keep the whitespace
  }
}
no whitespace here

会导致

no whitespace here
 please keep the whitespace
please keep the whitespace
no whitespace here

有效地将空白更改为单个空格。

如何保留原始空白设置?

不起作用的 nocompact() 是一个错误吗?

4

1 回答 1

1

我认为这是一个错误。请在https://github.com/greenlaw110/rythm/issues上提出问题

于 2015-04-01T10:52:31.320 回答