Explorar o código

cats generator removes trailing spaces;

bjorn hai 5 meses
pai
achega
4fcbe70e47
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      api/generators/cats.lua

+ 1 - 1
api/generators/cats.lua

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