瀏覽代碼

cats generator removes trailing spaces;

bjorn 6 月之前
父節點
當前提交
4fcbe70e47
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/generators/cats.lua

+ 1 - 1
api/generators/cats.lua

@@ -68,7 +68,7 @@ end
 --- contains newlines, they are prefixed with `---`.
 local function doc(str)
   str = str or ""
-  return "---" .. str:gsub("\n", "\n---")
+  return "---" .. str:gsub("\n", "\n---"):gsub('%s*$', '')
 end
 
 --- Determines if a parameter is optional. If it is, returns a `?` suffix.