浏览代码

Fix splices at the start not being linkified

Thomas Dy 3 年之前
父节点
当前提交
7111db89b7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      format.ts

+ 1 - 1
format.ts

@@ -175,7 +175,7 @@ class TextFormatter {
 
   bodyHTML(): SafeString {
     const splices = this.splices
-      .filter(({ indices }) => indices[0] && indices[1])
+      .filter(({ indices }) => indices[0] !== undefined && indices[1] !== undefined)
       .sort((a, b) => a.indices[0] - b.indices[0]);
 
     let index = 0;