소스 검색

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.