This commit is contained in:
kunfei committed 2023-05-19 19:49:40 +08:00
1 parent 67595ac3dd
commit 1ca3b9846d
2 files changed
+16

No files matched your search

+15
View File
@@ -14,6 +14,21 @@
**2023/05/19**
* 目录格式化js添加一个公用变量gInt, int类型默认值0
> 示例1
```
"第" + index + "章" + title
```
> 示例2
```
gInt++
"第" + gInt + "章" + title
```
* 优化修复bug
* 其中一些更新由 Xwite, Horis 提供
@@ -121,6 +121,7 @@ object BookChapterList {
coroutineContext.ensureActive()
val formatJs = tocRule.formatJs
val bindings = SimpleBindings()
bindings["gInt"] = 0
list.forEachIndexed { index, bookChapter ->
bookChapter.index = index
if (!formatJs.isNullOrBlank()) {